i have a script that currently runs in a one track mindset....currently the user makes a selection from four options but the outcome is identical regardless of the selection. what i need to have changed is that if a user selects option 1 the end variable will be different.
Very general question, perhaps more details will get you better results. But since you are mentioning user selections, see if this fits ... if ($_POST['selection'] == 'AnswerA') { echo 'resulting page for Answer A' ; } elseif ($_POST['selection'] == 'AnswerB') { echo 'resulting page for Answer B' ; } elseif ($_POST['selection'] == 'AnswerC') { echo 'resulting page for Answer C' ; } else { echo 'resulting page for Answer D' ; } PHP:
I have sent you a PM regarding this work. ^^ I think this is a much more efficient way to do it, but it produces the same affect: switch ($_POST['selection']) { case "AnswerA": echo 'resulting page for Answer A' ; break; case "AnswerB": echo 'resulting page for Answer B' ; break; case "AnswerC": echo 'resulting page for Answer C' ; break; case "AnswerD": echo 'resulting page for Answer D' ; break; default: echo 'you did not provide an answer'; } PHP: