All pastes #174951 Raw Edit

Someone

public text v1 · immutable
·published 2006-09-18 11:00 UTC
rendered paste body
<?
include("/home/incs/functions.inc.php");
	#if (strpos($key, '_ck')) { 
		#	echo $val;
		#	echo '<BR>...';
class doform {

	public $method;
	public $varname;
	
	function get_vars_basic() { 
		global $HTTP_GET_VARS;
		global $HTTP_POST_VARS;
		global $MethodArrays;
		if (strtoupper($this->method) == "POST") { 
			$MethodArrays=$HTTP_POST_VARS;
			$MethodArraysShort="p"; };
		if (strtoupper($this->method) == "GET") { 
			$MethodArrays=$HTTP_GET_VARS; 
			$MethodArraysShort="g"; };

			while(list($key,$val) = each($MethodArrays)) { // basic chars set
			if (is_numeric($val)) { 
				
				$FormArr[$key]=gint($key,$MethodArraysShort);
				$FormArr[$key]=intval($val);
			} else {
				$FormArr[$key]=gchar($key,$MethodArraysShort);
			
		}
	
	
	}
	
 return $FormArr;
}
	global $FormArr;
		
	
	
	/**********************************************************/
	/**********************************************************/
	/**********************************************************/
	/**********************************************************/
	/**********************************************************/
	/*	PHP-SERVER CHECKINGS FUNCTIONS
	/**********************************************************/
	/**********************************************************/
	/**********************************************************/
	/**********************************************************/
	/**********************************************************/
		

	function Pusername ($varname) {
		print_R($this->FormArr[${varname}]);

		
	}
	
	
	
	
	
	
}

		$check1 = new doform;
		$check1->method="get";
		$check1->get_vars_basic();
		$check1->Pusername('amir');
		
	 ?>