hjkhhrtertererrrrrerrtertertertertertertert
bnmbnerterterterterterdfgdfgdfgdfgdfgdfgdfgdfgdfg
/
home4
/
digil8bw
/
arrowaim.in
/
Upload FileeE
HOME
<?php ob_start(); include("configuration/function-include.php"); $email=addslashes(trim($_POST['email'])); $password=addslashes(trim($_POST['password'])); if(!isset($_POST['Remember_Me'])){ $Remember_Me=0; }else{ $Remember_Me=$_POST['Remember_Me']; } $sql="select * from register where email='".$email."' and password='".$password."'"; $result=mysqli_query($conn, $sql); $line=mysqli_fetch_array($result); $num=mysqli_num_rows($result); if($num>0){ if($Remember_Me==1) { setcookie("email",trim(stripslashes($_POST['email'])),time()+60*60*24*30); setcookie("password",trim(stripslashes($_POST['password'])),time()+60*60*24*30); } else { setcookie("email",""); setcookie("password",""); } $_SESSION["Email"]=$line['email']; $_SESSION["ID"]=$line['id']; $_SESSION["NAME"] = $line['name']; $t=time(); $login_time= date("D, M d,Y g:i a",$t); $sql1="UPDATE register SET user_last_login='".$login_time."' where email='$email' and password='$password'"; mysqli_query($conn, $sql1); $_SESSION['lg_msg']="login"; header("Location:db-profile.php"); exit(); }else{ $_SESSION['sess_msg']="Enter valid username and password"; header("Location:login.php"); exit(); } ?>