Re: PHP_SELF and parse error

From: Date: Tue, 10 Feb 2004 01:08:39 +0000
Subject: Re: PHP_SELF and parse error
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-32877@lists.php.net to get a copy of this message
Maybe you have register globals turned off? Try this: $_SERVER["PHP_SELF"] instead of $PHP_SELF. On Mon, Feb 09, 2004 at 07:49:17PM -0500, Remember14a@aol.com wrote: > From: Remember14a@aol.com > Date: Mon, 9 Feb 2004 19:49:17 EST > To: php-db@lists.php.net > X-Mailer: 9.0 for Windows sub 5003 > Subject: [PHP-DB] PHP_SELF and parse error > > Dear friends, > > I tried to modify submit if elseif statement. That didn't work.I have pasted > code of form and output with error. > Any comments on erros, please. > > Asif > > > > ------------------------------------------------------------------------------ > --------------------------- > Notice: Undefined variable: submit in C:\webroot\display.php on line 16 > > Notice: Undefined variable: PHP_SELF in C:\webroot\display.php on line 19 > > > 1 > Treatment of Hypertension > > a)loop diuritics > b)clonazepam > c)benzodizap > d)lorazepam > > 2 > Thrombolytic treatment of Myocardial infarction > > a)streptokinase > b)diltiazm > c)aspirin > d)heparin > > > ------------------------------------------------------------------------------ > ------------------------------------- > //code for above output and error > > > <HTML><body bgcolor=""><?php > // open the connection > $conn = mysql_connect("localhost", "", ""); > > // pick the database to use > mysql_select_db("testDB",$conn); > > > // create the SQL statement > $sql = "SELECT * FROM testTable"; > > // execute the SQL statement > $result = mysql_query($sql, $conn) or die(mysql_error()); > //go through each row in the result set and display data > > if (!$submit) { > > > echo "<form method=post action=$PHP_SELF>";

« previous php.db (#32877) next »