Re: Passing form to self
| From: | Daniel R. Anderson | Date: | Mon, 28 Apr 2003 08:49:35 +0000 |
| Subject: | Re: Passing form to self | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145484@lists.php.net to get a copy of this message | ||
First off, one caveat: The following functions must be allowed in
either your php.ini or when you compile PHP -- I forget which. Consult
the documentation on PHP.net for more information.
<?php
echo $_SERVER['DOCUMENT_ROOT'];
echo $_SERVER['PHP_SELF'];
/*
I think this is right. DOCUMENT_ROOT should give you the web page
minus the PHP script and PHP_SELF should give you the script name, so if
you put this code between the quotes in ACTION=" " it should work.
Disclaimer: This is off the top of my head. The documentation will
tell you the details of each one. You may need to echo an / between the
two.
*/
?>
So, basically, look up the $_SERVER[ ] array in the documentation. :-D
Hope that helps,
-Dan Anderson