Re: PHP_SELF and parse error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx wrote:
> From: Remember14a@xxxxxxx
> Date: Mon, 9 Feb 2004 19:49:17 EST
> To: php-db@xxxxxxxxxxxxx
> X-Mailer: 9.0 for Windows sub 5003
> Subject:  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>";

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux