I think i finally got this licked but i wanted to check with you all first.
here is what i did to clean my input and make sure every time that i have a valid db connection. I am not getting any errors so i think
its working fine.
since this db file is included in every php file i have then in the file itself i just call
here is what i did to clean my input and make sure every time that i have a valid db connection. I am not getting any errors so i think

PHP Code:
class my_db extends DB_Sql {
var $Host = "localhost"; //Database hostname (most likely localhost)
var $Database = "dbname"; //Database name
var $User = "dbuser"; //Database user uesrname
var $Password = "dbpass"; //Database user password
}// close class my_db
//clean the input using db connection
function cleanInput($value){
$db=new my_db;
$link = $db->Connect($User, $Password, $Database, $Host);
$cleanvalue=mysql_real_escape_string($value, $link);
return $cleanvalue;
}//close cleaninput
PHP Code:
$var = cleanInput($_POST['whatever']);
Comment