I have been sloppy in teh past and just used

if($submit) blah blah blah

not sure of ramifications, but seems to work unless $submit is "false" or not

again, take with grain of salt,  other suggestions (especially isset) are much
more certain.


>-----Original Message-----
>Sent: Friday, March 15, 2002 3:46 PM
>To: Daniel Negron/KBE
>Subject: Re: [PHP] Re: Undefined Variable in IF...ELSE IF ...ELSE IF
>On Fri, 15 Mar 2002, Daniel Negron/KBE wrote:
>> Thank You Charlie.  I also found out that I needed to put an "@" symbol
>> infrom of the string.  This stopped it from throwing me an error.
>> If(@$submit) blah blah blah
>Better yet, use:
>   if (isset($submit)) blah blah blah
>That explicitly checks to see whether the variable has been defined
>previously in the run, which makes your code easier to understand and
>avoids the klugey @.
>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