IF statement & Button
Posted: Sun Jan 09, 2011 7:30 pm
I have two drop down boxes which give me $extract and $extract2. The user can not select the same seat from each drop down. I don't know how to get my IF statement to work.
well it does work but because when the page loads both boxes are null and the same the 'else' message appears
is there a way to say.... ignore IF statement if both boxes are null?
Thanks. =)
well it does work but because when the page loads both boxes are null and the same the 'else' message appears
is there a way to say.... ignore IF statement if both boxes are null?
Code: Select all
//SUBMIT BUTTON
echo "<br>";
echo "<br>";
echo "<input type='submit' name='select' value='Select Seats'>";
echo "</form>";
//IF TO SEE IF TWO SEATS ARE SAME
if ($_POST['select']="")
{
echo "please choose seats";
}
if ($_SESSION['extract']==$_SESSION['extract2'])
{
echo "You have choosen the same seat twice, please choose two different seats.
<a href='confirm.php'> Go Back</a>";
}
Thanks. =)