RE: [PHP] PHP_SELF - silly question

From: Date: Tue, 23 Jan 2001 19:16:38 +0000
Subject: RE: [PHP] PHP_SELF - silly question
Groups: php.general 
Request: Send a blank email to php-general+get-36245@lists.php.net to get a copy of this message
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:no.spam.lhotch@unicap.com] Sent: Tuesday, January 23, 2001 12:21 PM To: php-general@lists.php.net 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: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#36245) next »