jesica
06-18-2008, 06:26 AM
Hello everybody,
i would like to ask , how can i have correct my syntax when i want to use if statment with three times OR operator . See this example :
if(($_POST['fruit1'] > 0) OR ($_POST['fruit2'] > 0) OR ($_POST['fruit3'] > 0) {
$frut = TRUE;
}
else
{
$frut = FALSE;
echo '<b>Please choose at least 1 of 3 fruits</b>';
}
Is this the correct syntax when i want to use if and compare 3 times weith OR ? Cause when am testing my whole code am getting an error right on this point, something with my OR's and if statment aint correct . :(
Please can you help me ..?
Thanks a lotta n' waiting for your answers ;)
i would like to ask , how can i have correct my syntax when i want to use if statment with three times OR operator . See this example :
if(($_POST['fruit1'] > 0) OR ($_POST['fruit2'] > 0) OR ($_POST['fruit3'] > 0) {
$frut = TRUE;
}
else
{
$frut = FALSE;
echo '<b>Please choose at least 1 of 3 fruits</b>';
}
Is this the correct syntax when i want to use if and compare 3 times weith OR ? Cause when am testing my whole code am getting an error right on this point, something with my OR's and if statment aint correct . :(
Please can you help me ..?
Thanks a lotta n' waiting for your answers ;)