• Advertisement
Sign in to follow this  

WAP browser redirect in php

This topic is 4977 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I've got code looks something like this wml <anchor> <go href="check.php" method="post"> <postfield name="pin_num" value="$(pin_num)"/> </go> </anchor> and php if(isset($_POST["pin_num"])) { header("Location: http://www.druidev.com/downloads.wml"); } and keep getting this error message Warning: Cannot modify header information - headers already sent by (output started at /home/druid/public_html/wap/check.php:2) in /home/druid/public_html/wap/check.php on line 11 I've been trying to figure this out all day. Anyone have any idea's Cheers Kev

Share this post


Link to post
Share on other sites
Advertisement
You've already sent something to the browser (usually HTML or some other data) when you call the header() function. This won't work. You need to make calls to header() before you send anything to the browser. If you can't rearrange your code to put the header() call before HTML/data starts getting output, then you'll have to look into output buffering. See the PHP.net documentation on header() for more information.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement