POST/GET into variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



how does this look? should this by me calling ... myforms = new forms(); work by turning all key/value pairs for both get and post into variable names of the same name as the get/post key, and the variable values as the values from the post/get?

class forms {

	// Some stuff
	var $MyPosts;
	var $MyGets;
	var $CleanedInput;

    // Connect to the database
	function forms() {
		foreach($_POST as $curPostKey => $curPostVal) {
			CleanInput($curPostKey);
			$$curPostKey = $curPostVal;
		}
		foreach($_GET as $curGetKey => $curGetVal) {
			CleanInput($curGetKey);
			$$curGetKey = $curGetVal;
		}		
	}

    // Attempt to login a user
	function CleanInput($userInput) {
		return $this->CleanedInput;
	}
}

thanks to anyone in advance

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux