Re: how to check the form filled all

From: Date: Fri, 16 Jan 2004 04:36:38 +0000
Subject: Re: how to check the form filled all
Groups: php.windows 
Request: Send a blank email to php-windows+get-22589@lists.php.net to get a copy of this message
Sungpill Han,Hello! $value="" should be corrected $value=="" ======= 2004-01-15 17:33:14 ======= >HI, i want to check if the user filled the all inputs in the form. So, I >checked NULL and "" with this function in the post receiving script. >------------------------------- >function is_filled_out() >{ > // test that each variabl has a value > foreach($_POST as $key => $value) > { > if(is_null($value) || $value="") > return false; > } > return true; >} >--------------------- >but when I submit the form without putting any value, it returns 'true'. >what's wrong with my code? > >-- >PHP Windows Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > = = = = = = = = = = = = = = = = = = = =         Meteorlet         meteorlet@sjtu.edu.cn           2004-01-16

« previous php.windows (#22589) next »