Jump to content

Order form spread across multiple pages


php_guy

Recommended Posts

I have an ordering process that consists of 3 pages:

 

1) Page1: Enter name/address

2) Page2: Based on address, determine availability of products, and let user choose which products, how many, etc.

3) Page3: Enter credit card info to send to the processor

 

What is the best way to store information fro page 1 to page 2, then from page 2 to page 3? I thought about just using hidden fields. Is this OK? Is there another preferred way?

 

Thanks!

Link to comment
Share on other sites

sessions. hidden fields can be manipulated MUCH easier than session data.

 

you'll be using sessions to track the user through multi pages anyway, so you can keep their info in session variables OR store to database in case they leave without completing portions.

Ahhhhh I KNEW there was a cleaner way than just hidden fields :)

 

How secure are sessions? And would it just be a matter of doing: $_SESSION['myfield'] = myvalue?

 

Besides the user clicking the close button of the browser, when are session variables destroyed?

 

Thanks

Link to comment
Share on other sites

And would it just be a matter of doing: $_SESSION['myfield'] = myvalue?

 

Besides the user clicking the close button of the browser, when are session variables destroyed?

 

1. I'd do $_SESSION['formname']['myvalue'] because you'll probably have other stuff in your session.

2. When you choose to destroy them http://us2.php.net/manual/en/book.session.php

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.