Results 1 to 4 of 4

Thread: send data in text box to webserver

  1. #1

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409

    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

  2. #2

    Thread Starter
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409
    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

  3. #3
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    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.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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
  •  



Click Here to Expand Forum to Full Width