Hi
I´m trying to redirect from a loginpage.
i have tried with header ("location: /login.php");
but I get an errormessage saying
Warning: Cannot add header information - headers already sent by (output started at C:/XITAMI/webpages/checklogin.php:12) in C:/XITAMI/webpages/checklogin.php on line 24
this is the only code on the page
<?
$db = mysql_connect("localhost", "root");
mysql_select_db("highway",$db);
$result = mysql_query("SELECT * from user where name='$login' and passwd='$passwd'",$db);
if('echo mysql_num_rows($result)'==0)
{
Header("Location: login.php");
}
else
{
Header("Location: test.php");
}
?>