RE: [PHP] Re: 4.0.2 = 4.2.3, form vars are empty?
-Original Message- From: Pekka Saarinen [mailto:[EMAIL PROTECTED]] Sent: 28 September 2002 10:14 For commonly used $PHP_SELF I use this: if (isset($_SERVER)) $PHP_SELF = $_SERVER['PHP_SELF']; $scriptname = basename($PHP_SELF); What's wrong with $HTTP_SERVER_VARS['PHP_SELF']? Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: 4.0.2 = 4.2.3, form vars are empty?
At 9/27/2002, you wrote: Erwin mailto:[EMAIL PROTECTED] scribbled; Qmail List wrote: Hello List, I'm putting a php app that has been off-line for about 18 months back on-line. During my absence from php I had heard about some security issues, so figured I'd try the latest 4.2.3 release. Sessions and the DB are fine, but GET/POST vars are continually empty. I mean a form submission from .html to .php (about the simplest thing possible) the variables are not getting populated with their form values. Turn register_globals = On in the php.ini file... HTH Erwin Or better yet, actually use the new $_GET[] and $_POST[] and leave that option off. If you want to make the script compatible both with register globals=off and work with old AND new PHP versions, use $HTTP_POST_VARS and $HTTP_GET_VARS. Manual says they are deprecated, but there is no reason to presume they are removed from PHP any time soon. And if that day comes it's a few minutes task to search and replace all sources to convert them to $_GET and $_POST. For commonly used $PHP_SELF I use this: if (isset($_SERVER)) $PHP_SELF = $_SERVER['PHP_SELF']; $scriptname = basename($PHP_SELF); This way users don't have to select from two source versions, one PHP 4.1.0 and one 4.1.0. - Pekka Saarinen http://photography-on-the.net - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: 4.0.2 = 4.2.3, form vars are empty?
Erwin mailto:[EMAIL PROTECTED] scribbled; Qmail List wrote: Hello List, I'm putting a php app that has been off-line for about 18 months back on-line. During my absence from php I had heard about some security issues, so figured I'd try the latest 4.2.3 release. Sessions and the DB are fine, but GET/POST vars are continually empty. I mean a form submission from .html to .php (about the simplest thing possible) the variables are not getting populated with their form values. Turn register_globals = On in the php.ini file... HTH Erwin Or better yet, actually use the new $_GET[] and $_POST[] and leave that option off. -jesse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php