This script is used to enter a password for the user and to determine if the password is correct.
If it is correct, go to the Welcome page.
if ($login) {
Include (".. /include/config.inc.php3 ");
Session_Start ();
$right _enter= ' 0 ';
$query = "SELECT * from User_define where user_login= ' $user _login ' and User_pass=password (' $user _pass ')";
$result = @mysql_query ($query, $dbconnect);
if ($user _array= @mysql_fetch_array ($result)) {
$user _id= $user _array[user_id];
$user _name= $user _array[user_info];
Session_register ("user_id");
Session_register ("user_name");
Session_register ("User_array");
if (($user _array[ticket_day]) and ($user _array[ticket_num]) {
$right _enter= ' 1 ';
}
else{
$error _message= "Sorry, you don't have permission to book tickets! ";
}
}
else{
$error _message= "Error! The user name is wrong, or the password is wrong. Please re-enter. ";
}
$log _time=date ("y-m-d h:i:s");
$query = "INSERT into Log_record (log_time,user_login,remote_addr,right_enter,enter_function) VALUES (' $log _time ', ' $ User_login ', ' $REMOTE _addr ', ' $right _enter ', ' 1 ');
@mysql_query ($query, $dbconnect);
if ($right _enter) {
Header ("Location:welcome_reserve.php3");
Exit
}
}
if ($logout) {
Session_Start ();
Session_unregister ("user_id");
Session_unregister ("user_name");
Session_unregister ("User_array");
}
?>
<title>User Login</title>
if ($error _message) echo " $error _message ";
?>
http://www.bkjia.com/PHPjc/319165.html www.bkjia.com true http://www.bkjia.com/PHPjc/319165.html techarticle ? PHP//This script is used to enter a password for the user and to determine whether the password is correct. If it is correct, go to the Welcome page. if ($login) {include (".. /include/config.inc.php3 "); Sessi ...