Re: if $submit

From: Date: Mon, 21 May 2001 15:36:02 +0000
Subject: Re: if $submit
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-53744@lists.php.net to get a copy of this message
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

« previous php.general (#53744) next »