im trying to make a function that splits up the process of making a query and use the information received from the function to build a working INSERT INTO query.
currently im getting this error
Unknown column 'josh' in 'field list'
and the function code..
public static function insert($name , $columns , $values)
{
$sql ="INSERT INTO $name ($columns) VALUES ( $values )";
self::$insertinto = mysqli_query(self::$connect , $sql ) or die(mysqli_error(self::$connect));
mysqli_real_escape_string(self::$connect , self::$querytable);
return self::$insertinto;
}