Warning: Invalid argument supplied for foreach() in /opt/lampp/htdocs/pbook/inc/login.in.php on line 12
<?php
include 'contacts.php';
if($_SERVER['REQUEST_METHOD']=='POST'&& $_POST['submit']=='Login')
{
$lname = isset($_POST['lname']) ? trim($_POST['lname']):NULL;
$lpwd = isset($_POST['lpwd']) ? trim($_POST['lpwd']):NULL;
if(($lname!=NULL)&&($lpwd!=NULL))
{
$lobj=new DB_Action();
$l=$lobj->disp("Select * From members where memname= '$lname'and mempass='$lpwd'");
foreach ($l as $result)
{
$aid =$result['memid'];
$_SESSION['_ENTER'] =1;
header("location:address-book.php?l=$aid");
exit;
}
}
}
?>