Okay, I admit it, I'm new to this thing called PHP. I have a small question. Any help would be greatly appreciated.
I have an html page with a form that submits itself to a purely php page (no html). This processess the request and redirects you to 2 possible pages. I've figured out how to do the redirect using header and "Location: " but my question concerns the parameters in the url.
The url I forward to contains some parameters. By default, using header with Location and "page.php?foo=bar", the request is sent using GET. Is there a way I can modify the redirect header to force a POST? Is this even possible?
I know I can resolve this by changing the page with the form by adding PHP and making it submit the form back to itself and process the form (as the method is POST). However, this requires me to put some PHP code before the <html> tag (to allow for the redirect). This is a problem because the program the web designer uses to edit the page, GoLive (on a mac, don't know which version), has a nasty tendancy of chopping out anything that precides the <html> tag. Suffice to say, this is extremely frustrating.
Help? 😕
Any solution or alternate paths of investigation would result in my eternal gratitude. (Not much, I know, but I'm a young and poor programmer and am just happy to have a job).
Many thanks,
baseline