我把自己逼疯了,找不到我的错误。如果有人能看到错误,请从我的痛苦中拯救出来。这是一个简单的登录表单,在 PC 浏览器中运行良好,但在移动浏览器中没有活动。
这是我的代码
<form action="login.php" method="post">
<table>
<tr>
<td>User Name:</td>
<td>
<input autofocus name="username" type="text" style="font-size:30px;" />
</td>
</tr>
<tr>
<td>Password</td>
<td>
<input name="password" type="password" style="font-size:30px;" />
</td>
</tr>
</table>
<p class="center span5">
<button type="submit" style="font-size:30px;" name="login">Login</button>
</p>
</form>
PHP代码是
$username = $_POST["username"];
$password = $_POST["password"];
$resultt = mysql_query("SELECT * FROM Table_name WHERE admin_username ='$username' AND admin_password ='$password'");
$result = mysql_num_rows($resultt);
if ($result != 0) {
while ($row = mysql_fetch_assoc($resultt)) {
$type = $row['admin_type'];
$user_info = $row['user_info'];
$_SESSION['username'] = $username;
$_SESSION['user_info'] = $user_info;
}
}