<?php
echo $_REQUEST['uname'];
echo $_REQUEST['pass'];
$res= $mysql_query("select * from `sec` where uname='$_REQUEST['uname']' AND `pass`='$_REQUEST['pass']'");
if(mysql_num_rows($res)>0)
{
header('location:home.php')
}
else
{
header('location:index.php')
}
?>
What’s this error:header information cannot modify...
even the username and passwords are correct it is not redirecting to another page and giving this warning..
why this error is coming??
All the php work should be done before sending any data to the browser.
If You are using your own code you should write code in this way
OR
If you have to redirect after the header information have already been set, you should use javascript function to redirect as