header command
Posted by: ahada (60.50.39.---)
Date: July 27, 2006 02:26AM

any one can help me>>>?

when i use header cammand, it didn't work with WAMP..

how can i resolve this problem.. can help me, please!


this is the code;;

<?php

header("Location :main1.php"winking smiley;

?>

Options: ReplyQuote
Re: header command
Posted by: CyberSpatium (67.170.181.---)
Date: July 27, 2006 04:30AM

are you getting any header error messages? if so, it is because you can not use the header function if you have already output before anything to the browser.

you need to edit your code to not output anything, or you can use output buffering.


ob_start()

[us2.php.net]

Options: ReplyQuote
Re: header command
Posted by: tomfmason (---.ks.ok.cox.net)
Date: July 30, 2006 06:44AM

What error are you getting. Usaly this means that a white space exits somewere.

Try this
[php]
<?php
header("Location: [www.yoursite.com]);
?>
[/php]

Report any errors that you may get

Options: ReplyQuote


Sorry, only registered users may post in this forum.