This post involves two questions:
Firstly i am posting variables to an html file - receive.html - and i get this error: The requested method POST is not allowed for the URL, any ideas as to what that means?
and secondly how would i receive those variables on the second page?
Thanks in advance
It means what it says. The web server will not accept a POST method against that URL so you have to use GET. You can't consistently get those values to a second page without using a server side process.
The get method will pass data from form fields through the querystring whereas the post method will send the data to the server in headers that only a server-side script will be able to process. If you're not working with any server-side script (as is implied by the .html extension on your file) then you will have to use the get method as ray said.
When information is passed through the quearystring it will appear as follows:
Edit: To get the information back on the next page you'll need to parse the query string and split the string about the & symbols. That will get you some name/value pairs, then you could split them about the = symbol to separate out the name and the value. I'll write a function to do that and post it in a bit.
Another Edit: Scratch that, I found a script that someone's already written.
Last edited by David Harrison; 11-08-2004 at 02:56 PM.
Every fight is a food fight when you’re a cannibal.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)