php header
Php Header Problem
Well. If you really want to redirect users using php then you have to use a buffer or send the header before the anything else is sent.
| |
|
Welcome to KnowledgeSutra - Dear Guest | |
Php Header Problem
Started by adly3000, Feb 05 2006 10:53 PM
12 replies to this topic
#12
Posted 18 August 2008 - 11:48 AM
Replying to Amezis
Dude. Get your facts right. If you buffer your code you can use header after having sent html or any other code to the browser.
Dude. Get your facts right. If you buffer your code you can use header after having sent html or any other code to the browser.
#13 Guest_kamal chapagain_*
Posted 13 May 2011 - 12:47 AM
silentwind, on 06 February 2006 - 05:35 AM, said:
simple javascript function should fix that problem :
And about your error. It's because you have allready echo an output that is produced by your error.
error = output some html code.
?>
<script language="javascript">
top.location.replace("http://www.path.you.want.to.redirect//");
</script>
<?php
And about your error. It's because you have allready echo an output that is produced by your error.
error = output some html code.
Hi, that was really a good idea and here is the code
$redirect = "<script language=\"javascript\">
top.location.replace(\"http://yourredirectURL\page.php\");
</script>";
if($success) {
echo $redirect;
}
else { echo "Whatever you want"; }
CHEERS
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users














