<?php
// CleanVar, copyright 2013, EB Dynamics, Inc., Ed Lemmers
// For licensing, see license.txt.
//

function CleanVar($var)
{
	$bad_strings = array("INSERT INTO ", "UPDATE ", "SELECT ", "DROP TABLE ", "DROP DATABASE ", "DROP SERVER ", "DROP COLUMN ", "TRUNCATE ", "CREATE TABLE ", "CREATE TEMPORARY TABLE ", "CREATE DATABASE ", "DELETE ", " OR ", " LIKE ", ";");
	
	if ((strpos($var, ";") !== false) || (stripos($var, "or") !== false) || (stripos($var, "like") !== false))
		$var = str_ireplace($bad_strings, "", $var);
		
	return($var);
}
?>