Good afternoon,
I have a problem I'm not to PHP savvy but I want to create a form with several check boxes. When user selects a check box or multiple check boxes after hitting submit they will be given different links depending on what check box they hit.
Below is an example of what I have, but its not ideal as it would take a lot of time creating each separate pages to redirect users for each different answers they give. I want the form when hit submit to show users the answers as link. For example if they check the first and third box, it will give them the links to a place where they can dance and another link on where they can eat vegetarian food. Or if they check the third and fourth boxes it will give them to those places. If anyone can help I would really much appreciate it! Thank you in advance! Let me know if I'm not too clear.
HTML
<form action="http://www.gaylv.com/what_questions.php" method="post">
<input type="checkbox" name="option1" value="1" /> I want to dance <br />
<input type="checkbox" name="option2" value="1" /> I want cheap drinks <br />
<input type="checkbox" name="option3" value="1" /> I want vegetarian food <br />
<input type="checkbox" name="option4" value="1" /> I want an outdoor patio <br />
<input type="checkbox" name="option5" value="1" /> I want to play video games <br />
<input type="submit" name="send" value="Submit" />
</form>
PHP
<?php
if($_POST['option1'] == 1 ){
header("Location: http://www.gaylv.com/clubs");
}
elseif($_POST['option2'] == 1 ){
header("Location: http://www.yahoo.com");
}
elseif($_POST['option3'] == 1 ){
header("Location: http://www.bing.com");
}
elseif($_POST['option4'] == 1 ){
header("Location: http://www.tinkergraphics.com");
}
else {
header("Location: http://www.floridataxreduction.com");
}
;?>