How are variables called in current php?

From: Date: Mon, 15 Sep 2003 00:07:41 +0000
Subject: How are variables called in current php?
Groups: php.general 
Request: Send a blank email to php-general+get-162587@lists.php.net to get a copy of this message
hi, all, I have a piece of code stuck at the point of "if (($REQUEST_METHOD=='post'))". "var_dump($REQUEST_METHOD);" shows that the variable doesn't exist. Since I grabbed the code from a 2001 update, is there any chance that this is already obsolete? I checked the documentation but didn't find anything relevant. Any advice would be highly appreciated. ;-) The following is the complete code that I got stuck at if (($REQUEST_METHOD=='post')) { //////////////////////////////// // This loop removed "dangerous" characters from the posted data // and puts backslashes in front of characters that might cause // problems in the database. //////////////////////////////// for(reset($HTTP_POST_VARS); $key=key($HTTP_POST_VARS); next($HTTP_POST_VARS)) { $this = addslashes($HTTP_POST_VARS[$key]); $this = strtr($this, ">", " "); $this = strtr($this, "<", " "); $this = strtr($this, "|", " "); $$key = $this; } else { print ('Boo, I never got executed'); }//apparently the script never make it to this point And add appriopriate assigments at the top of your script.

« previous php.general (#162587) next »