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;
>    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

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?

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to