Yep, thats it, I knew it was a stupid question. I already had a few
globals assigned in the function, dont know why I didnt think to ad
PHP_SELF as well. Thanks.
Krznaric Michael wrote:
>
> You may have to declare PHP_SELF as global. Take a look at
> http://www.php.net/manual/en/language.variables.scope.php
>
> Mike
>
> -----Original Message-----
> From: Larry Hotchkiss [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 23, 2001 12:21 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP_SELF - silly question
>
> 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+W
> HERE+LCASE%28partnumber%29+LIKE+%27x%25%27+ORDER+BY+partnumber+&offset=100&n
> umpage=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.
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]