0

みなさん、こんにちは。スクリプト用の小さなアドオンを作成しようとしています。これは php コードです。

 <?php
if (isset($_SESSION['uid'])) {
    header('Location: /members');
} else {
    echo '<table width="40%" border="0" align="center" cellpadding="5" cellspacing="2">
  <tr align="center" valign="top"> 
    <td bgcolor="#99CC00" class="thinbord"><font color="#FFFFFF"><strong>قسمت ورود کاربران</strong></font></td>
  </tr>
  <tr align="center" valign="top" bgcolor="#EEF7FF"> 
    <td class="thinbord"><table width="100%" border="0" cellspacing="0" cellpadding="2">
        <form action="/members/" method="post">
          <tr> 
            <td height="25" align="center" valign="bottom" class="boxtext"><strong>email :</strong></td>
          </tr>
          <tr> 
            <td align="center" class="boxtext"><input type="text" name="email" size="20" maxlength="100"></td>
          </tr>
          <tr> 
            <td align="center" class="boxtext"><strong>پسورد:</strong></td>
          </tr>
          <tr> 
            <td align="center" class="boxtext"><input type="password" name="passwd" size="20" maxlength="20"></td>
          </tr>
          <tr> 
            <td align="center" class="boxtext"><input type="hidden" name="form" value="sent" > 
              <input name="submit" type="submit" value="login" ></td>
          </tr>
          <tr> 
            <td align="center" class="boxtext"><a href="/lost.php<? if ($ref) {echo("?ref=$ref"); }?>">lost your pass click here</a>
              <br>please check your spam</b></td>
          </tr>
          <tr> 
            <td align="center" class="boxtext"><a href="/signup.php<? if ($ref) {echo("?ref=$ref"); }?>">sign up</a></td>
          </tr>
        </form>
      </table></td>
  </tr>
</table>';
}?>

使用可能なセッションの uid を表示するスクリプトは、ページをメンバーにリダイレクトします。使用できない場合は、スクリプトがログイン用のテーブルを表示します。インデックスでこのページに移動する前にセッションが開始されますが、機能せず、ページをメンバーにリダイレクトしません。

4

1 に答える 1