How would I implent an autologin feature to this script?
session_start();
$result = mysql_query(\"SELECT id FROM users
WHERE username
We can create auto login using cookies in php , this feature is required in case you want to create web view of your website , as mobile user don’t want to login every time they open your android app (web view of your web site. You can use the code below tom implement the auto-login on your php based website
0 && $row[‘auto_login’]==1)
{
$_SESSION[‘uname’] = $email;
$_SESSION[‘uid’]=$row[‘id’];
setcookie (“username”,$email,time()+ 3600);
setcookie (“password”,$pwd,time()+ 3600);
header(‘Location:myhome.php’);
}
}
?>
My Expense-Login
User Login
”>
” >