On Mon, May 21, 2001 at 03:15:37PM +0100, Tarrant Costelloe wrote :
> Whenever I use the <? if ($submit) >? statement in a php page it always
> comes up with:
>
> Warning: Undefined variable
> Until the submit has been hit, and then it continue on with the rest of the
> script fine ( ifelse).
>
> How do you stop this warning message?
1) set new error level: error_reporting( E_ALL ^ E_NOTICE);
2) use isset()
if( isset( $submit)) { ...
3) or use @ in front of the variable
if( @$submit) { ...
- Markus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]