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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect logic

Status
Not open for further replies.

mcquam

Technical User
Feb 26, 2007
89
GB
I need to redirect users depending on their response to form input questions (it is a questionnaire and respondents don't have to answer all questions). What is the best way to do it? I have tried a redirect like this:
Code:
<?php if ($q1 == "1") Header("Location: index.php?p=q01_02"); ?>
Where the GET array contains the next question page.
Is there an easier way than this?
 
First add a column to your question table to signify the kind of answer you expect to get back.

In the answers table have a column corresponding to each kind of answer and then save the answer to the correct column based on the type in the question table.
 
OK I think I've got it now. Mant thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top