Re: [PHP] Re: syntax for checking if string contains something

2001-10-23 Thread liljim
Hey, > if (isset($submit)){ > if (!empty($qty)) > { echo "Please enter the quantity for your quotation enquiry.";} > > > When nothing was filled in for $qty the if condition did not prompt me to > enter a quantity. This is wrong: if (!empty($qty)) { echo "Please enter

Re: [PHP] Re: syntax for checking if string contains something

2001-10-22 Thread Peter
Thanks for your reply. But I tried it and it seems to pass right through the if condition without checking if the string is empty or not. Here is another PHP file where I tried using the "empty" function The input form contains the following: QTY: Here is the part that checks whether or not t

[PHP] Re: syntax for checking if string contains something

2001-10-22 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Peter) wrote: > for example > if ($email =="") > > checks if the $email variable was inputted by the user. Better: if(!empty($email)) > However I was wondering how can I refine it so that it will also check if > the $e