Ok, here is what you need to wrap your brain around.
1.) What are you sending the form through? GET or POST?
Using POST you can call a variable by using $POST['varname'];
Using GET you use $GET['varname'];
2.) From there you will run what cases you want. I will provide an example to you.
<?php
// Checks varname to see if it is set to 1.
if($_POST['varname'] == 1)
{
// This will display if the variable is set to 1.
echo "Sweet Variable 1 was chosen!";
}
// Checks to see if varname is set to 2.
if($_POST['varname'] == 2)
{
// This will display if the variable is set to 2.
echo "Sweet Variable 2 was chosen!";
}
// Checks to see if varname is set at all!
if(!isset($_POST['varname']))
{
// This will run regular HTML if the variable is not set.
// Such as with an initial page load.
?>
<form action="" method="POST">
<select name="varname">
<option value="1">Value 1</option>
<option value="2">Value 2</option>
</select>
<input type="submit" name="submitbox" value="Submit">
<?php
}
?>
Check out this example and there are faster ways of doing this. But the long way will provide a greater understanding of the language. Keep coding and keep learning.
EDIT: I forgot the submit box. Haha whoups. Ignore the notice's as well, those are just saying that the variable is not set yet.
Chad