Return to Snippet

Revision: 53163
at November 15, 2011 07:48 by flatearthcomms


Initial Code
foreach ($_REQUEST as $key => $value) {
			$value = mysql_real_escape_string( $value );
			$value = addslashes($value);
			$value = strip_tags($value);
			
			if($value != ""){$requestnumber ++;}
			
			//echo $key. ' - '.$value.'</br>';
			
			if (preg_match('/^item_number/', $key)) {
				
				//echo "I have a course key " . $value.'</br>';
		
				$sql=" UPDATE `xxx` SET `xxx`='1'WHERE `xxx` = '$value' ";
				$result=doSQL($sql);
		
			} 	
		
		}

Initial URL

                                

Initial Description

                                

Initial Title
Loop through $_REQUEST matching a parameter starting xxxxxx.....

Initial Tags
regex, php, regexp

Initial Language
PHP