Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multipage Script 1

Status
Not open for further replies.

brogan

Technical User
Oct 7, 2003
44
GB
I'm looking to create a multipage questionnaire PHP script for my company. I would like the user to be able to go back to previous pages in the questionnaire to review answers. What would be the best to approach the questionnaire? Would I use a MySQL database to enter the data after each page? Any other methods?

It's just that I would like to start with the best approach rather than spend lots of time developing a less appropriate and inefficient method.

Any advice would greatly appreciated

Mark
 
If you stored the results in a database as you submitted each page, then you could provide links to go back to previous questionnaire pages (and the supplied answers would be visible). This also serves to support users that closed the browser (or were disconnected) and allows them to "resume" their questionnaire (and it is for this reason I would avoid using session variables to store the results until you are ready to "submit" the whole lot at once).

Any other methods?
If you wanted a javascript solution that didn't require multiple pages, you could show/hide each "page" of the questionnaire using javascript/css and then have a final "Submit" that actually submitted the complete form. This would allow you to provide links to show/hide other "pages" in the questionnaire and the data would still be present (because the form has yet to be submitted).

I would go for the first option [smile]

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top