How can i add numerics in conditional if statement?
Posted: Wed Jun 27, 2007 8:40 am
I made a drop down menu and i need script to check the value and add +35 under certain condition
in one of drop down options the value = "22". if that one isnt selected it should add 35 (numeric) to all the others .
when i use echo it shows that it will only add 35 when value is not '22' so it seemed to be working as for the logical side
but when i do it like the above it wont show up in my echo $total.
Can i not add numeric values to variables that way? It's giving really high and crazy numbers instead of nothing .
in one of drop down options the value = "22". if that one isnt selected it should add 35 (numeric) to all the others .
Code: Select all
if($_POST['menu1'] != '22') {
$total + 35 ;
}but when i do it like the above it wont show up in my echo $total.
Can i not add numeric values to variables that way? It's giving really high and crazy numbers instead of nothing .