RE: [PHP-INSTALL] $PHP_SELF
| From: | Rob A Brooks | Date: | Tue, 30 Sep 2003 19:16:01 +0000 |
| Subject: | RE: [PHP-INSTALL] $PHP_SELF | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-11979@lists.php.net to get a copy of this message | ||
Try $_SERVER['PHP_SELF']
If you don't have 'register_globals = on' setting in your php.ini file
then you must reference these special server variables in this way.
It's generally a good idea to leave 'register_globals = off' and
identify the global variables either by $_SERVER['varname'] or
$_POST['varname'] etc. because the other way can be a security risk.
-----Original Message-----
From: Adam Dear [mailto:wad3@msstate.edu]
Sent: Monday, September 29, 2003 9:49 PM
To: php-install
Subject: [PHP-INSTALL] $PHP_SELF
I have just installed php. I am new to php. I have read several
items(ie.
books, online documentation). I have seen references to a variable
called
$PHP_SELF. I have tried to use it in a form, but to no avail.
Here is a line of code where I have used it:
<form action=<?php echo $PHP_SELF ?>?form=yes method="post">
However, when I view the souce of this page, the "action" attribute is
simply:
<form action=?form=yes .....
The $PHP_SELF variable is not referencing anything. Is there something
that
I have not configured properly?
Please help a newbie.
Thanks