This is my code.... Its query is working but problem in the header()....... plz help..........
$d=mysql_query("SELECT * FROM admin where ad_email='{$_POST['email']}'");
$row=mysql_fetch_object($d);
$fid=$row->ad_email;
$fpass=$row->password;
if($fid==$_POST['email'] && $fpass==$_POST['password'])
{
$_SESSION['admin']=$_POST['email'];
header("location: http://www.myhostexampl.co.in/alprofile.php");
exit();
}
else
{
echo 'invalid id or pass';
}
Hope this will help you. Instead of using header('location:your_url_to_redirect');
try with header('Location:your_url_to_redirect');
still if it will not work then please try with below code:
echo '<script type="text/javascript"> window.location = "your_url_to_redirect";</script>';
Location:
must start with uppercase L and there must be a space after : It should be like
header('Location: http://www.example.com/');