<?php

//+-----------------------------------------------------+//
//+ Copyright Brian Shawa
//+ Index.php
//+ Form Processor
//+-----------------------------------------------------+//


class Cleaner{
	
var $debug_mode = 0;
var $last_error;

var $data_array;

var $cleaned_data = array();

	
	function Cleaner($data_array){
		
		//are we in debug mode
		global $cleaner_debug;
		$this->debug_mode = $cleaner_debug;
		
		//check if any data
		if($clean_me ==''){
		$this->last_error = 'No vars detected for cleaning';
        $this->ObjDebug();
        return false;
		}
		
		//check if data is array type
		if(!is_array($data_array) || empty($data_array)){
		$this->last_error = 'No data array detected';
        $this->ObjDebug();
        return false;
		}
		
}



function EscapedMysql(){
	
	foreach($this->data_array as $key => $value){
		$value = mysql_real_escape_string($value);
		$value = array($key=>$value);
		$this->cleaned_data[] = $value;		
		}
		print_r($this->cleaned_data);
	return $this->cleaned_data;
}
	
	
	
	
	
	
	
	
	
	
	
//Debug function
private function ObjDebug(){
if($this->debug_mode ==1){echo $this->last_error; echo "\n";} //debug mode	
}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	}//cleaner end

























?>