if($_REQUEST[‘hid’] == “ok” && ($
{
$user = $_POST[user];
$pass = $user[pass];
$email = $user[emailid];
$table = “gen_user”;
$where = “WHERE emailid = ‘$email’ AND password = ‘$pass’ AND status = ‘1’”;
$res = $Obj->GetAllWhere($table,$where);
if(count($res)>0)
{
if($
{
$u = $user[emailid];
//Setting cookie
$x = setcookie(“iw_user”, “$u”, time()+60*60
}
$_SESSION[emailid] = $res[0][emailid];
$
$_SESSION[type] = “user”;
header(“location:myaccount.php”);
}
else
{
$acc = “<font color=’red’>Invalid email id and password</font>”;
$smarty->assign(“arr”,$acc);
}
}
//check cookie is set or not
if (isset($_COOKIE[“iw_user”]))//checking user cookie check or not
{
$email = $
$table = “gen_user”;
$where = “where emailid = ‘$email’ AND status = ‘1’”;
$res = $Obj->GetAllWhere($table,$where);
if(count($res)>0)
{
$_SESSION[emailid] = $res[0][emailid];
$log[first_name] = $
$smarty->assign(“log”,$log);
}
}
[upl-file uuid=8080e389-9e60-49c7-9d48-179f71eb13ed size=5kB]New Text Document (2).txt[/upl-file]