开发者

Multi page ordering form php or ajax

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 wa开发者_如何学编程y 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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜