session| page <?php
This script is used to enter the password for the user and to determine if the password is correct.
If 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 do not have the right to book tickets!" ";
}
}
else{
$error _message= "Wrong! User name is wrong, or password is wrong. Please re-enter it. ";
}
$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");
}
?>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.