"==" (2) is for comparison while you are accidently doing assignments by
"=" (1)
if ($lastname="") - wrong
if ($lastname=="") - better
that's why u r screwed up here :-)


At 17:49 30.06.02 -0500, Richard Lynch wrote:
>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?  http://l-i-e.com/artists.htm
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to