I found a problem when dealing with zeros in forms. Post values containing 0 just won't be not empty.
Check this script:
Try selecting Zero and submit. Then try One.
What's the problem???
Thank you.
Check this script:
PHP:
<?php
if (empty($HTTP_POST_VARS["choose"]))
echo "No value<br>";
else
{
echo "There's a value! - $HTTP_POST_VARS[choose]<br>";
}
?>
<form method="post" action="got_value.php">
<select name="choose">
<option value="0">Zero</option>
<option value="1">One</option>
</select>
<input type="submit" value="submit">
</form>
Try selecting Zero and submit. Then try One.
What's the problem???
Thank you.