HTML5 AND PHP CODE TO CREATE A SESSION FOR LOGIN - LET'S BE CREATIVE

HTML5 AND PHP CODE TO CREATE A SESSION FOR LOGIN

session_start();
include "connect.php";
if(isset($_POST['singin'])){
$name = $_POST['name'];
$pass = $_POST['password'];
$sql="SELECT * FROM rec WHERE name='$name' and password='$pass'";
$result=mysql_query($sql);
if($result){
$_SESSION['uname'] = 'uname' ;
$_SESSION['pass'] = 'pass' ;
header("location:fetch.php");
}
else {
echo "Wrong Username or Password";
}
}

?>




Untitled Document






 
   
LOGIN DETAILS

 
 
   
USER NAME

   
   
 
 
   
PASSWORD

   


 
 
   


 





Featured