Error in header function
Posted
by
user1178695
on Stack Overflow
See other posts from Stack Overflow
or by user1178695
Published on 2012-03-30T20:20:35Z
Indexed on
2012/03/30
23:30 UTC
Read the original article
Hit count: 154
php
I'm using the php header function for the redirection but it is not working.I'm using the following code.
$sql=mysql_query("select * from password where username='$email' and password1 = '$pwd'");
//echo "selct * from password where username='$email' and password = '$pwd'";
$row=mysql_fetch_row($sql);
$fieldset=mysql_num_rows($sql);
$host=$_SERVER['HTTP_HOST']."/beta/";
if($fieldset>0 && $conEmail !="")
{
$_SESSION['email']=$email;
$_SESSION['Email']=$email;
$_SESSION['memberID']=$id;
$_SESSION['status']='Admin';
header("location:http://".$host."member.php");
}
© Stack Overflow or respective owner