0

I'm looking to create a multi page ordering form the first page would contain some dropdown and text fields, the second page would contain more text fields, the third page would be an order summery with paypal payment option.

I'm just wondering what the best way to create this order form is. I've used sessions in the past but never with users entering in text and picking items from drop downs, does anyone have any resources for doing this? Or does anyone know of a jquery or other ajax example or plugin I might be able to use and modify.

any insight would be a big help.

thanks

Adam
  • 2,632
  • 8
  • 34
  • 60
  • Would not use AJAX if there is any information that needs to be secure. – Kerry Jones Jun 17 '10 at 23:17
  • Because that means the secure data has to be sent via ajax which is generally insecure unless you encrypt before sending and after, and that still has security disadvantages. – Kerry Jones Jun 18 '10 at 00:16
  • @Kerry: Because the encryption has to be reversible (in this case)? You can still do an XMLHttpRequest over an SSL connection, as long as the original page that does the request also uses `https:`. – Marcel Korpel Jun 18 '10 at 00:24
  • Hmm, I've heard, though for no particular reasons, or got the impression that AJAX requests are much easier to intercept – Kerry Jones Jun 18 '10 at 09:21

2 Answers2

0

The simplest technique might be to use hidden form fields to carry fields from previous screens through to the final screen.

Just make sure you validate all the values when the final screen is submitted to make sure that the user hasn't twiddled the data.

Don Kirkby
  • 53,582
  • 27
  • 205
  • 286
0

You don't need to do pagination at all if you don't won't to. Just use css to show/hide the "pages". It doesn't sound like you have to save the "state" at any point.

But if you want to do multiple pages, use a session or a cookie to track the user. Then save the data to a database a mark it as incomplete. On the final page, retrieve it all and show it on the page. The server can't tell if a request is ajax or not, so it doesn't matter what you use for submission.

Brent Baisley
  • 12,641
  • 2
  • 26
  • 39