Sign in to follow this  
Dracodev

WAP browser redirect in php

Recommended Posts

Dracodev    132
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
ApochPiQ    23064
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this