PHP_SELF - silly question
| From: | Larry Hotchkiss | Date: | Tue, 23 Jan 2001 17:21:11 +0000 |
| Subject: | PHP_SELF - silly question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-36224@lists.php.net to get a copy of this message | ||
Im a little brain fried today and I have a silly question. I have a
script (imagine that huh?) that I want to pull some code out of and put
in a function that is contained in a seperate file. The function however
inlcudes some lines with $PHP_SELF in a link (a href). When I remove the
code from the running script and include it in a function file seperate
from the script the function works fine as far as generating links etc,
but when the link that includes $PHP_SELF is selected, the file of the
running script is not passed.
So in other words, when I have my function code in my running script, it
generates some links that limit a query on a mysql database and pass
data to PHP_SELF, the passed URL looks like this (for example):
http://69.02.217.123/php4/php.exe/searchitem.php?sql=SELECT+%2A+FROM+items+WHERE+LCASE%28partnumber%29+LIKE+%27x%25%27+ORDER+BY+partnumber+&offset=100&numpage=3
But, when I move the code to create the links externally into a
function, the link I end up with is like this:
http://69.02.217.123/?sql=SELECT+%2A+FROM+items+WHERE+LCASE%28partnumber%29+LIKE+%27x%25%27+ORDER+BY+partnumber+&offset=100&numpage=3
Can someone shed some light on the best way to handle this?
--
Larry H.