PHP Question: Post Variables
Published by philipnorton42 on Fri, 07/29/2011 - 18:10Question
Take the following HTML form.
1 2 3 4 | <form id="form" name="form" method="post"> <input type="text" name="number" value="0" /> <input type="submit" /> </form> |
What is the output of the following PHP code after the above form has been submitted, and why?
1 2 3 4 5 | if ($_POST['number'] === 0) { echo 'number is zero'; } else { echo 'number is not zero'; } |
Category: