|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Problem: Redirecting
Hi guys,
I have a problem of redirecting, and this is part of my script where the error occurs: <? if ($login == 'Ok') { ?> <HTML><HEAD><TITLE>You're Logged In!</TITLE></HEAD> <BODY><CENTER>Congratulation You're logged in</CENTER></BODY></HTML> <? } header ("Location: UserControlPanel.php"); ?> It gave me the following error: Warning: Cannot add header information - headers already sent by (output started at /path/to/the/file/login.php:120) in /path/to/the/file/login.php on line 182 I want it to work just like how it's working in any forum when you login to the forum, it redirect to a temp page telling you "Thank you for login" and then redirect to the forum sections or your control panel. How can I do something like this? |
|
#2
|
|||
|
|||
|
RE: Problem: Redirecting
Use a meta tag instead. The header function in php can't be used if you want to display something to the screen and then redirect...
|
|
#3
|
|||
|
|||
|
RE: Problem: Redirecting
just to mentione:
(i am not shure about this, but i think i so smth like this on one page.) u can use "delay" paramether to the header() function just as in <meta http-equiv tag... so, this could be ok, and u could echo smth to the user, and redirect him with redirect header, 5 secs later: header("Location: 5;url.php"); i think i so this in phpBB code, and only to bi used with IIS server. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Problem: Redirecting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|