Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect page

Status
Not open for further replies.

taval

Programmer
Jul 19, 2000
192
GB
Hi,

I'm making login page in PHP, how do I redirect the user to another page (e.g. when the username is wrong).

Thanks.
 
Hi,

I tired using the header but it doesn't work.

the code I have is:

------

if (mysql_affected_rows() == 0)
{

echo(&quot;<p>USER NAME DOES NOT EXIST</p>&quot;);
redirect to another page????
}
else
{
echo(&quot;<p>USER NAME ALREADY EXISTS</p>&quot;);
}

------

I have this code and I just want to be able to go to another PHP page held on the server. In ASP, it's something like Reponse.Redirect, but I don't know how to do this in PHP. Grateful for any help, Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top