开发者

PHP pages that store information between forms so that the form information is stored before submit

开发者 https://www.devze.com 2023-02-10 13:42 出处:网络
This is inside a开发者_开发百科 PHP website form. An example is like: First page: -Username: -Password

This is inside a开发者_开发百科 PHP website form.

An example is like:

First page:

-Username:

-Password

Second page:

-Email

-[Checkbox]

Thirdpage:

-Contact Details

-Address

Fourth page: Review all of the above forms in hard copy but with a back and forward command so that the user does not loose any information when switching between these pages.

Please post.


You could use cookies and do your own sessions with MySQL too. I like doing it like that because the data is easier to access if necessary.

Or you can pass the previous variables to the next page though hidden form elements.. but that can get messy.


You Have to use session. I like Zend_Session.


If you want users to be able to come back later and complete the form (assuming you have some kind of login system, or a way to recognize users), you could still save the data into a database. Make another table, temp_submissions. Keep data in it until the user completes the form and commits the data they send. Once committed, clear the data out of the temp_submissions folder and insert it into the "permanent" table. It may not be practical in this case, or total overkill, but it's an alternative to sessions and cookies.

0

精彩评论

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

关注公众号