Here is my code.
i want to show welcome message and firstname lastname in logout page from database when logged in correctly.
process.php
$email = $_POST['user'];
$password = $_POST['pass'];
$email = stripcslashes($email);
$password = stripcslashes($password);
$email = mysql_real_escape_string($email);
$password = mysql_real_escape_string($password);
mysql_connect("localhost", "root", "");
mysql_select_db("data");
$result = mysql_query("select * from user where email ='$email' and password = '$password'");
$row = mysql_fetch_array($result);
if($row['email'] == $email && $row['password'] == $password){
$_SESSION['email'] =$email;
$_SESSION['password'] =$password;
header("Location: lpage.html");
}
else{
echo "";
}
?>
login.html
User ID
Password
User Login
logout.html
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Venkatesh K HPosted Nov 24, 2016, 2:53 AM
Suvendu Shekhar GiriPosted Nov 24, 2016, 2:30 AM