关于session的问题!
Y3721 2005-07-15 08:35:15 <?
$usse=$_POST['username'];
$pwd=$_POST['password'];
$db=mysql_connect("localhost");
mysql_select_db("Examine",$db);
$result=mysql_query("select user_pwd from user where user_name='$usse'");
if(mysql_num_rows($result)!=1)
{
echo "对不起,不存在此姓名的用户!";
//err_output("the user name is not have");
}
else
{
$arruser=mysql_fetch_array($result);
if($arruser["user_pwd"]!=$pwd)
{
echo "Sorry,密码错误!";
//err_output("The password is wrong");
}
else
{
session_start();
$_SESSION['user_name']=$user_name;
echo $user_name;
}
}
?>
echo $user_name
没有输出任何数据!
不知道是哪里的问题!请大家多多指教!!