require_once("../conn.php");
if(isset($_POST[s2]))
{
$MyUsername1 = strip_tags($_POST[username1]);
$MyPassword1 = strip_tags($_POST[password1]);
if(empty($MyUsername1) || empty($MyPassword1))
{
$MyError = "
All fields are required!";
}
else
{
//check the login info if exists
$q1 = "select * from domain_admin where username = '$MyUsername1' and password = '$MyPassword1' ";
$r1 = mysql_query($q1);
if(mysql_error())
{
header("location:error1.php");
exit();
}
else
{
if(mysql_num_rows($r1) == '1')
{
$a1 = mysql_fetch_array($r1);
$_SESSION[AdminID] = $a1[adminid];
$_SESSION[username] = $a1[username];
header("location:index.php");
exit();
}
}
}
}
?>
Admin Panel