How can I get data from profile.php file when i click
Signin(signin.php)
signin.php
<?php
$error="";
if(isset($_POST["smit"])){
$email=$_POST["email"];
$password=$_POST["pwd"];
$db=new
mysqli("localhost","root","","test");
$rs=$db->query("select
count(*) from jak_signup where email='$email' and
password='$password'");
$row=$rs->fetch_array();
if($row[0]==1){
//$_SESSION["s_email"]=$row[0];
//$_SESSION["s_password"]=$row[1];
header("location:index.php?item=2");
}else{
$error="<div
style='color:red; float:right; margin-right:70px;'>Incorrect Password
or Email</div>";
}
}
?>
<form action="#"
method="post">
<div style="width:1000px;
margin:10px;">
<div style="float:left;
width:325px;">
<h1
style="color:red">Free</h1><br/>Are you add your
Paribahan this site?<a href="#">Click
here</a><br/>
</div>
<div
style="width:323px; margin-left:325px; border-left:1px solid blue;
text-align:justify;">
<div
style="background-color:lightgray; border-radius:10px;
text-align:center; margin:10px;"><h2>Online Ticket
booking<h2></div>
<?php echo $error; ?>
<div
style="margin:10px 20px;">
<p>Username/Email <b
style="float:right">: <input type="text"
name="email"/></b></p>
<p>Password
<b style="float:right">: <input
type="password"
name="pwd"/></b></p>
<p>Remember
Password<input type="checkbox" name="rpwd"
/><input type="submit" name="smit"
value="Sign in"
style="float:right;"/></p>
<p>New user?<a
href="index.php?item=1">Sign up</a> | <a
href="#">Forgot
Password?</a></p>
</div>
</div>
</div>
</form>
profile.php
<?php
include_once("db_conf.php");
$db=new
mysqli(SERVER,USER,PWD,DB);
$rs=$db->query("select
first_name,mobile,email from jak_signup where
email='jhzilon@yahoo.com'");
/*echo "<table
style='border:1px solid gray'>";
echo "<tr
style='background-color:gray;'><th>Name</th><th>Phone</th><th>Email</th></tr>";
while($row=$rs->fetch_array()){
echo
"<tr><td>$row[0]</td><td>$row[1]</td><td>$row[2]</td></tr>";
}
echo
"</table>";*/
while($row=$rs->fetch_array()){
echo
"<table>";
echo
"<tr><td>Name</td><td>$row[0]</td></tr>";
echo
"<tr><td>Phone</td><td>$row[1]</td></tr>";
echo
"<tr><td>Email</td><td>$row[2]</td></tr>";
echo
"</table>";
}
?>
Comments 2