Hi all
First time asking for help in a forum as i normally like to figure things out myself but after not having used php for over a year, i'm a bit stuck with what i'm trying to do and hoping some kind soul is able to point me in the right direction...
In the nutshell, I have a web form which has two drop down menus among other things. What i want to be able to do is make it so that depending on what options are chosen from the drop downs, after clicking submit the user is presented with a URL where a file is available for download. There are numerous files each uniquely dependant on the options chosen in the drop down menu.
For example..
CODE
<td align="left"><select name="matriculation" id="matriculation_year">
<option value="2007">2007</option>
<option value="2006">2006</option>
<option value="2005">2005</option>
</select>
is a few of the options available in the first drop down menu.
CODE
<td align="left"><select name="common_room" id="common_room_affiliation">
<option value="JCR">JCR</option>
<option value="MCR">MCR</option>
</select>
is the entire second drop down menu (which is NOT dependant on what option is chosen in the first drop down).
SO, what i would like to do is offer a certain URL should the user choose 2005 and JCR, and offer a different URL should the user choose 2007 MCR etc.
The code i have so far to try and sort this out is:
CODE
<?php
if(isset($_POST['post']))
{
if (($_POST['matriculation'] == '2007') AND ($_POST['common_room'] == 'MCR'))
{
header("Location: https://whatever.com");
}
elseif (($_POST['matriculation'] == '2006') AND ($_POST['common_room'] == 'MCR'))
{
header("Location: https://somewhere_else.com");
}
else { die("Error"); }
exit;
}
?>
Unfortunately, as it is so long since i used PHP, i'm not even sure i'm going along the right track with this one. The form action is a new page where it shows the same form and it *should* offer the correct URL underneath the form, but at the moment it is doing nothing at all except showing the HTML code making up the form. No matter what i try i cannot get a URL displayed

Any help you could offer would be greatly appreciated.
Many thanks