Have an account? Sign in
Login  Register  Facebook
php if else statement
I have created this code and I want the user when he/she enter number 1 or 2 and it will show hola but now you must write 1 or 2 until It showing the message I want it when enter 1 show the message or 2 can any one help
$name = $_POST['name'];
if ($name =="1 or 2")
echo "hola";
Started: September 18, 2011 Latest Activity: September 18, 2011 php if else
1 Answer
its very basic
just it will be
if ($name == \"1\" or $name == \"2\")
full Reference:

Posted: MacOS
In: September 18, 2011

Your Answer

xDo you want to answer this question? Please login or create an account to post your answer