Jump to content

form data , not able to go to previous page


stijn0713

Recommended Posts

Hello, i'm trying to make a little survey program.

 

So far, in my view_survey.php page i retrieve all the questions and options from the database and put them in a session. For each new question, i echo a form with question and the options and, after submit i unset that question in the session.

 

I don't think this is a good way, as i cannot go back to the previous question for example.

 

Any suggestions of tackling it another way?

 

 

Store the question ID / step number in the session, and use that to fetch the correct question from the database when you need it.

I've answered a very similar question to this one a few weeks back, and outlined how I'd do the process in my reply in that thread. I recommend a search for it, as you should find that thread quite useful.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.