|
-
Jan 26th, 2004, 11:49 AM
#1
Thread Starter
Hyperactive Member
send data in text box to webserver
i just created my own simple webserver with the tutorial from this great site http://www.winsockvb.com/article.php...e_id=24&page=2
right now all it knows is the GET statement.
what i want to be able to do is have it send the user a web page with a form that they can fill out then when the user clicks a button it will send the info in the form back to the server.
the sending works fine and the user gets the form, but i dont know how to send data they fill out back to the server.
i think im supposed to use POST but im not shure how it works
any help would be apriciated
nate
-
Jan 26th, 2004, 12:00 PM
#2
Thread Starter
Hyperactive Member
ok i played around with it some and it i do this
Code:
<html><head><title>Post.html</title></head>
<body>
<form action="netxpage.html" method="GET">
<pre>
Your Name: <input type="text" name="name">
Email Address: <input type="text" name="email">
Age: <input type="text" name="age">
Favorite Color: <input type="text" name="favorite_color">
</pre>
<input type="submit" value="Send">
<input type="reset" value="Clear Form">
</form>
</body>
</html>
now i send it and the data is in the message sent to the server but wheni change it from GET to POST i dont see the data anymore
im not shure why but i guess this way will work
-
Jan 26th, 2004, 12:04 PM
#3
Frenzied Member
Is that a direct copy from your code? Because "nextpage" is spelled wrong in the action part of your form.
This would be a lot easer with PHP.
And when you say you "don't see the data anymore"... do you mean in the URL or do you mean you can't get to the values anymore? Because POST doesn't put the data in the URL like GET does.
-
Jan 26th, 2004, 12:18 PM
#4
So you want your server to be able to receive POST requests?
Somewhere in the heap of rfc documents should be one describing the POST HTTP action. Find and read it.
Or simply follow this link.
http://www.w3.org/Protocols/
Last edited by CornedBee; Jan 26th, 2004 at 12:23 PM.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|