PHP Redirect - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: PHP Redirect (/showthread.php?tid=39487) PHP Redirect by DJeX on 03-03-2005 at 11:21 PM Ok, I have an upload code that uploads a song and creates a web page for that song. When the code is done running it want it to go to another page in the same window. Like a "Your song is now uploaded page". How would I redirect it to a new page when the code is done doing its thing? RE: PHP Redirect by Concord Dawn on 03-03-2005 at 11:22 PM RE: PHP Redirect by Plik on 03-03-2005 at 11:25 PM
As long as you havnt outputed any thing else you can use. code:But if you want it to show a message you could output a javascript redirect script with the page. Or use a meta tag. RE: PHP Redirect by L. Coyote on 03-03-2005 at 11:26 PM
If you haven't outputted text or cookies or the like, you can use header("Location: somepage.php") RE: PHP Redirect by DJeX on 03-03-2005 at 11:49 PM Yea it gives me a "headers already sent" error. So how would I activate the javascript redirect when the php is done? Would I just put it at the end of the PHP code out of the <?php ?> tags? RE: PHP Redirect by L. Coyote on 03-03-2005 at 11:59 PM
quote:Yes, it can be put like that... code:Or like this... code: Edit: note I put pseudo-code (non-PHP), just to give you an idea of how it would look. That is not correct, and should be "translated" to PHP. I'm saying this just in case. RE: PHP Redirect by fluffy_lobster on 03-04-2005 at 12:13 PM
* fluffy_lobster vomits on javascript |