SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    May 2000
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ive built only a few forms mainly because the sites Ive done havent required much user input.

    Im learning PHP/mySQL and am needing to be clear on the differences between some of the form actions...

    Mainly Post and Get. Can anyone clerify what the difference between the two are?
    And if you know of any other methods ill need to be clear on when learning PHP/mySQL interaction, I would really appreciate that info too.

    Thank you

  2. #2
    SitePoint Guru
    Join Date
    Dec 1999
    Location
    Southampton, Hants, UK
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    'post' SENDS the actual data to the page or script it's pointed at.


    'get' goes to the page or script with the Data in the URL:
    If you have a form with 2 fields called 'name' and 'email' and you posted the data to a page called 'process.php' using hte get command, you would see
    'process.php?name=enteredname&email=enteredemail'



    'get' is mostly used for PHP and ASP; 'post' can be used with ASP and PHP but is also used for CGI scripts

  3. #3
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi jizbot,

    To expand on Dan's statements:

    Post:
    should be used with mailto: because the data is sent via the 'body' of the form information

    Get:
    is the default method
    the receiving page uses the URL's query string (everything after the question mark "?" )

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •