SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot janislanka's Avatar
    Join Date
    Sep 2004
    Location
    Lithuania
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    multiple page form script

    I have an Inquiry form that has two pages. Page one has some product details and page two has contact info. Client would fill out page one, then click 'next' and fill out page two and click 'finish'.

    Is there any simple script for that?

  2. #2
    SEO Addict eli03's Avatar
    Join Date
    Aug 2004
    Location
    Pasig City Cainta, Philippines
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can use session or use hidden form to pass the value to the next page.

  3. #3
    SitePoint Zealot janislanka's Avatar
    Join Date
    Sep 2004
    Location
    Lithuania
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, sorry! What I did not say is that I don't know PHP I know how to look at it and maybe configure a tiny bit, but that's as far as it goes.

  4. #4
    SitePoint Wizard Mike Borozdin's Avatar
    Join Date
    Oct 2002
    Location
    Edinburgh, UK
    Posts
    1,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can always take a look at the PHP documentation at www.php.net or buy a book.

  5. #5
    SitePoint Zealot janislanka's Avatar
    Join Date
    Sep 2004
    Location
    Lithuania
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that's not very helpful...

  6. #6
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,807
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Using session is quite simple and yes, the manual is not overly helpful but it does give you some idea of what sessions do.

    Consider the following....
    PHP Code:
    session_start(); # very important
    $_SESSION['username'] = $_POST['username'];
    $_SESSION['password'] = $_POST['password'];
    # the session var username now contains whatever was posted from the 
    # form field username and password from the password field. 
    The SESSION vars are now available to you on any further .php page as long as you have session_start(); at the top of it.
    What this means is the on the second page of your form, the info submitted from the first page is all stored in the SESSION vars.

    You can check what you have stored by using
    PHP Code:
    <pre>
    <? print_r($_SESSION); ?>
    </pre>
    To echo the SESSION vars use
    PHP Code:
    <? echo $_SESSION['username']; ?>
    Hope this clears things a bit for you!

    SpikeZ
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....


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
  •