title: Insert Statement Problem
body: <pre><code>$lastname = clean($_SESSION['lastname']);
  $firstname = clean($_SESSION['firstname']);
  $mi = clean($_SESSION['mi']);
  $nickname = clean($_SESSION['nickname']);
  $studentno = clean ($_SESSION['studentno']);
  $password = clean ($_SESSION['password']);
  $cpassword = clean ($_SESSION['cpassword']);
  $bdate = clean($_POST['bdate']);
  $maddress = clean($_POST['maddress']);
  $paddress = clean($_POST['paddress']);
  $status = clean($_POST['status']);
  $religion = clean($_POST['religion']);
  $telno = clean($_POST['telno']);
  $celno = clean($_POST['celno']);
  $email = clean($_POST['email']);
  $nationality = clean($_POST['nationality']);
  $batch = clean($_POST['batch']);
  $dept = clean($_POST['dept']);
  $course = clean($_POST['course']);
  $achvmnts = clean($_POST['achvmnts']);
  $emp = clean($_POST['emp']);
  $empadd = clean($_POST['empadd']);
  $position = clean($_POST['position']);
  $emptelno = clean($_POST['emptelno']);
  $empemail = clean($_POST['empemail']);
  </code></pre>
  
  <p>I have the following INSERT query for the values above where the first 7 are being retrieved from a saved session, everything are declared as varchar except for the fields bdate = date, celno and studentno = bigint, :</p>
  
  <pre><code>$result = mysql_query("INSERT INTO `$dept`(lastname,firstname, mi,nickname,bdate,maddress,paddress,status,religion,telno,celno,email,nationality,password,studentno,batch,dept,course,achvmnts,emp,empadd,position) VALUES
  ('$lastname','$firstname','$mi','$nickname','$bdate', '$maddress','$paddress','$status,','$religion','$telno',$celno,'$email','$nationality','$password',$studentno,'$batch', '$dept','$course','$achvmnts','$emp','$empadd,'$position')");
  </code></pre>
  
  <p>.I can't seem to find the error in this query, for hours i have been receiving "Query Error". can anyone please help me find the error. Thanks in advance!</p>