TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Venkatesh K H
NA
116
33.2k
How to display First name and Last name?
Nov 24 2016 2:15 AM
Here is my code.
i want to show welcome message and firstname lastname in logout page from database when logged in correctly.
process.php
<?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 "<script language=\"JavaScript\">\n";
echo "alert('User ID or Password was incorrect!');\n";
echo "window.location='login.html'";
echo "</script>";
}
?>
login.html
<p> User ID</p>
<p> Password</p>
</div>
</div>
<div class="s-11 l-6"><br>
<br>
<br>
<br>
<h2>User Login</h2>
<div class="customform" >
<div id="mail-status"></div>
<div class="block">
</div>
<div id="frm">
<form id="form" method="POST" action="process.php">
<div class="s-12 l-7">
<input type="email" id="user" name="user" required/></div>
<div class="s-12 l-7">
<input type="password" id="pass" class="masked" name="pass" required/></div>
<div class="s-3 l-7">
<button type="Login" id="btn" style="width: 100px; float: right; onClick="check(this.form)">Login</button></div>
logout.html
<code>
Reply
Answers (
2
)
sending multiple recipients email using smtp on PHP
How to use uppyjs alongside php and mysql