?> at the very top of the page before <!doctype etc. ?
I'm having a similar problem.
The form is part way down the page and not at the top of the page and I want it to go that specific location on the SAME page and not a different page, where the messages appear. I had problems using header ("Location: ):. It either went to the location on the page I wanted without the messages or saw the messages and at the top of the page but not both as I wanted. Annoying. On www.php.net I found a suggestion to use header ("refresh:5; url=http://www.domainname.ext#messages");and that worked on firefox, IE and safari. However a problem with chrome and opera. It goes to the top of the page, does not show the messages and does not show any info. entered in the form fields (sticky forms). I don't know what else to try.
Reidrect To A New Php Page
in PHP for the Web: Visual QuickStart Guide (4th Edition)
Posted
Have you got this problem fixed yet?
Did you try the full url? header ("Location: http://www.domainname.ext");as mentioned on page 229 in the tip?
Also did you put <?php
ob_start();
?> at the very top of the page before <!doctype etc. ?
I'm having a similar problem.
The form is part way down the page and not at the top of the page and I want it to go that specific location on the SAME page and not a different page, where the messages appear. I had problems using header ("Location: ):. It either went to the location on the page I wanted without the messages or saw the messages and at the top of the page but not both as I wanted. Annoying. On www.php.net I found a suggestion to use header ("refresh:5; url=http://www.domainname.ext#messages");and that worked on firefox, IE and safari. However a problem with chrome and opera. It goes to the top of the page, does not show the messages and does not show any info. entered in the form fields (sticky forms). I don't know what else to try.
Any suggestions from anyone???
Hopefully you get it working.