Re: Re: Undefined Variable in IF...ELSE IF ...ELSE IF (NEWBIE ?)
| From: | mnc at stoic dot net | Date: | Fri, 15 Mar 2002 20:45:51 +0000 |
| Subject: | Re: Re: Undefined Variable in IF...ELSE IF ...ELSE IF (NEWBIE ?) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88704@lists.php.net to get a copy of this message | ||
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 @.
miguel