Hi,
Thursday, January 15, 2004, 7:33:29 PM, you wrote:
SH> HI, i want to check if the user filled the all inputs in the form. So, I
SH> checked NULL and "" with this function in the post receiving script.
SH> -------------------------------
SH> function is_filled_out()
SH> {
SH> // test that each variabl has a value
SH> foreach($_POST as $key => $value)
SH> {
SH> if(is_null($value) || $value="")
SH> return false;
SH> }
SH> return true;
SH> }
SH> ---------------------
SH> but when I submit the form without putting any value, it returns 'true'.
SH> what's wrong with my code?
try
if(empty($val))
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php