RE: [PHP] register_globals=Off Question
| From: | John Holmes | Date: | Mon, 29 Apr 2002 02:13:21 +0000 |
| Subject: | RE: [PHP] register_globals=Off Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95048@lists.php.net to get a copy of this message | ||
You are missing an ending quote to begin with. Either add it in and use
braces, or remove the quotes.
action = '<?=$_SERVER["PHP_SELF"]?>'
or...
action = '<? echo $_SERVER["PHP_SELF"]; ?>'
or...
action = '<? echo "{$_SERVER['PHP_SELF']}"; ?>'
Adapt to your needs...
---John Holmes...
> -----Original Message-----
> From: Kirk Babb [mailto:kbcd@worldnet.att.net]
> Sent: Sunday, April 28, 2002 3:58 PM
> To: php-general@lists.php.net
> Subject: [PHP] register_globals=Off Question
>
> How do I use $PHP_SELF with register_globals off? I looked up the
> documentation on php.net but haven't gotten this line of code to work:
>
> <form name="form5" method="post" action='<?php
echo("$_SERVER[PHP_SELF];
> ?>'>
>
> I get this error instead:
>
> [28-Apr-2002 16:33:31] PHP Parse error: parse error, expecting
`T_STRING'
> or
T_VARIABLE' or T_NUM_STRING' in - on line 140
>
> what am I doing wrong? thanks,
>
> Kirk
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php