Page 1 of 1
How to redirect the user from one PHP Page to another?
Posted: Fri Nov 14, 2003 1:46 am
by gopinathd
Hi all,
Like redirect() method in ASP, Is there any method available in PHP to
redirect the user from one PHP Page to another?
If so, Please tell me.
Thanks in advance.
Gopinath
Posted: Fri Nov 14, 2003 1:50 am
by Paddy
header("Location: somepage.php");
Note: It needs to be done before any html...
Posted: Fri Nov 14, 2003 1:54 am
by gopinathd
Hi paddy,
Thanks for replying.
We can't redirect the user from one page to another,If Something
is written in page.
Like response.clear() in ASP, Is there any method available here?
TIA
gopinath
Posted: Fri Nov 14, 2003 1:57 am
by Paddy
Not that I know of. Keep watching though. Someone will know.

What is it that you want to do?
Posted: Fri Nov 14, 2003 2:30 am
by infolock
gopinathd, if you could be a little more descriptic on your needs, that would be great. have to understand, we have no idea what your project is doing. thanks

Posted: Fri Nov 14, 2003 7:09 pm
by gopinathd
In login screen, After writing some text, I come to know that the user name entered is not a valid one. In such a case, I am not able to redirect the user to the previous page. B'cas I have already written some text.
In this case, I want to clear the text what i have written on the screen and redirect the user to the previous page.
Your immedidate reply will make me glad.
Thanks in advance.
Gopi
Posted: Fri Nov 14, 2003 7:19 pm
by Paddy
Check if the user is a valid user prior to writing any text. I see no reason for you to write text if you are just going to redirect them anyway. Unless I am missing something?
Posted: Fri Nov 14, 2003 8:25 pm
by gopinathd
Like Response.clear() method in ASP,
Is there any method for clearing the text displayed on the screen ?
Posted: Fri Nov 14, 2003 10:16 pm
by Nay
Posted: Fri Nov 14, 2003 10:40 pm
by Paddy
You still haven't told us why you need the text prior to redirection.