1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HTML - Carry Form Data To Next Page

Discussion in 'HTML & JavaScript' started by darkmarth, Sep 6, 2010.

  1. darkmarth

    darkmarth Junior Member

    Joined:
    Aug 12, 2008
    Messages:
    160
    Likes Received:
    39
    Location:
    Bay Area!
    I see it ALL the time on Biz Opp landing pages...


    The user inputs their Name, number, address, email on Page 1

    Clicks 'submit'

    They are taken to the 'checkout page' where they are only asked for their credit card info on a secured page.



    What must be happening, the information is carried over and 'silently' placed into the checkout...but how do I carry the information over in the first place?!

    Any help would be appreciated...even if its a site for scripts...Thanks!
     
  2. cyklotrial

    cyklotrial Regular Member

    Joined:
    Oct 13, 2008
    Messages:
    248
    Likes Received:
    82
    Location:
    Wonderland
    All data are send using POST method to checkout page using some API variables.
     
    • Thanks Thanks x 1
  3. mappum

    mappum Registered Member

    Joined:
    Aug 8, 2009
    Messages:
    84
    Likes Received:
    11
    Location:
    At my computer... how else would I be on a forum?
    You should probably go about doing this by making a PHP script that sends all POST data from the last page to the next one by making them into hidden <input> elements (in the form the user will be submitting on the current page).

    If you need help with this I could make an example really quick.
     
    • Thanks Thanks x 1
  4. xhpdx

    xhpdx Regular Member

    Joined:
    Sep 21, 2008
    Messages:
    331
    Likes Received:
    2,160
    Occupation:
    Coder
    Location:
    EU
    The form has input fields with some names. When the form is submitted the next page catches the info using $_POST variables like $_POST['full_name'], $_POST['address'] and so on. For example $_POST['full_name'] will catch the variable from <input name="full_name" value="John Doe">. Hope this is clear enough
     
    • Thanks Thanks x 1
  5. Hellfire

    Hellfire Regular Member

    Joined:
    Jun 27, 2009
    Messages:
    241
    Likes Received:
    150
    Occupation:
    Student
    Location:
    Norway
    To put it simply, you can't do it with just HTML. You need PHP too.