i am just learning how to code for oop and i have an error that i have not seen
Fatal error: Class 'queryUpdate' not found in testingfile.php on line 28
line 28
$queryUpdate = new queryUpdate($table, $fields, $condition);
what i am trying to run. which is in another file that is brought in with an include
public function queryUpdate($table, $fields, $condition){
$values = "";
if($fields != ''){
foreach ($fields as &$value) {
${$value} = $_POST[$value];
$values .= $value."='$".$value."', ";
}
}
// remove our trailing space and ,
$fields = substr($values, 0, -2);
$query = "UPDATE $table SET $fields WHERE $condition ";
$result = mysql_query($query);
}
thanks in advance