Page 1 of 1
More Beginner Questions
Posted: Mon Nov 17, 2003 7:15 am
by TheFisherman
I am trying to figure out the equivalent of the ASP response.redirect. I would appreciate any help on this problem.
Posted: Mon Nov 17, 2003 7:22 am
by Nay
header("Location: wherever.html");
-Nay
Posted: Mon Nov 17, 2003 7:38 am
by TheFisherman
Thanks Nay, that seems to compile correctly. I am now having a problem with the command itself. I am trying to redirect to a local page at the top of the php code, and I get the error message :
Warning: Cannot add header information - headers already sent by (output started at d:\inetpub\tanstafl.com\rgc\Login.php:9) in d:\inetpub\tanstafl.com\rgc\Login.php on line 14
How do I get him to wait on sending the HTTP headers???
Thanks again,
Posted: Mon Nov 17, 2003 7:49 am
by JayBird
Posted: Mon Nov 17, 2003 7:49 am
by infolock
try using
Code: Select all
<?php
ob_start();
/// your code here
ob_end_flush();
?>
edit : bech100 just a little faster then i

Thanks
Posted: Mon Nov 17, 2003 7:58 am
by TheFisherman
Got it, thanks a million.