我遇到了一个问题,我的登录详细信息无法让我登录我的页面:(
所以我的设置页面是
<?php
$db = mysql_connect("$host", "$dblogin", "$dbpassword");
mysql_select_db("$dbname");
$res = mysql_query("SELECT * FROM userdb WHERE email='$email'");
$playerinfo = mysql_fetch_array($res);
$date2 = date("H:i");
function error($type)
{
if($type == "field")
{
echo '<body link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" bgcolor="#000000" text="#FFFFFF">';
echo '<p align=center><font color="red">You have left fields blank. Please <a href="index.php">relogin</a></font></center></p>';
}
elseif($type == "password")
{
echo '<p><center><font color="red">Incorrect password. Please <a href="index.php">relogin</a></font></center></p>';
}
}
echo '</body>';
?>
我的登录页面是
<body link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" bgcolor="#000000" text="#FFFFFF">
<p align="center">
<img border="0" src=logo.jpg></img></p>
<p align="center">
<form action=check.php method=post>
<p align="center"><font size=1><b><font face="Tahoma" size="2">Login.</font></b><br><br>
<samp style="font-weight: normal; font-size: 7pt; font-family: tahoma"><font face="Tahoma" size="2"><b>Email -</fomt></b></font></samp><font face="Tahoma" size="2"><b>
<input type="text" name="email" size="20" style="border: 1px solid black">
</b></font></font><font face="Tahoma" size="2">
<br>
<samp style="font-weight: normal; font-size: 7pt; font-family: tahoma">
<b><font face="Tahoma" size="2">Pass -</font></b></samp><b><font size="1" face="Tahoma"><input type="password" name="password" size="20" style="border: 1px solid black"></font></b><br><input type="submit" value="Log In" style="border: 1px solid black">
<br>
</form>
</body>
我的 check.php 页面是
<?
session_start();
include("setup.php");
if(!$email || !$password) {
error("field");
exit();
}
if($password == $info['password']) {
session_register("password");
session_register("email");
include("top.php");
echo "<p><b><center>Welcome</center></b></p>";
echo "<p><u><b>Members Area</b></u></p>";
echo "<p><center>- <b><a href=>Page</a></b> -</center></p>";
echo "<p><center>- <b><a href=logout.php>Log Out</a></b> -</center></p>";
include("bottom.php");
}
else
{
error("password");
}
?>
我总是收到一个错误,您将字段留空。请从我的索引页面重新登录,这样我就无法让我的用户登录
我哪里失败了?