In article <03d201c21db6$7deb2110$7800a8c0@leonard> , [EMAIL PROTECTED] (Leo) wrote:
>I have a form and I don't want to insert recording with blank value. >I put: >if ($lastname="") { > $insert="no" >} >if ($insert="no"){ > do not insert; >else > insert; >} >my probleme is in some case $lastname="" is true and other case is false. >I tried with $lastname=" " but no change. how can I check if a varible is >empty or not? if (isset($lastname)){ # Do MySQL insert } http://php.net/isset NOTE: CHECKBOX variables will not show up unless checked, so this technique will not necessarily work for them, depending on what business logic you are trying to achieve... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php