i am running this script but i get this error "You have an error in your SQL syntax near ' 'asd', 'qasdg', 'senior', '23', , NOW())' at line 1" does anyone know why?
function save_profile_date($ident = "", $first = "", $last = "", $year = "", $age = "", $gender = "") {
if ($_SESSION['is_rec']){
$sql = sprintf("INSERT INTO %s (id, user_id, first, last, year, age, gender, last_change) VALUES (NULL, %s, %s, %s, %s, %s, $s, NOW())",
PROFILE_TABLE, $_SESSION['user_id'], $this->ins_string($first), $this->ins_string($last),
$this->ins_string($year), $this->ins_string($age), $this->ins_string($gender));
}
if (mysql_query($sql) or die (mysql_error())) {
$this->profile_id = (!$_SESSION['is_rec']) ? mysql_insert_id() : $ident;
$this->the_msg = $this->extra_text(2);
} else {
$this->the_msg = $this->extra_text(3);
}
}