title: Insert record using php and access database - getting "Wrong parameter count for odbc_exec()"
body: <p>Insert record using php and access database - getting "Wrong parameter count for odbc_exec()"  Everything works except I can't get it to insert into the database.</p>
  
  <pre><code>$R1=rand(1,20);
  $db=odbc_connect('Eightball','','');
   $sql  = "SELECT * FROM theAnswers";
   $sql .= " WHERE id = " . $R1;
   $rs=odbc_exec($db,$sql);
  while (odbc_fetch_row($rs))
  {       
   $FinalAnswer=odbc_result($rs,"Answer");
   $newdate = date('M j, Y');
   $newQuestion = $_POST["Question"];
   if(isset($_SERVER['HTTP_REFERER'])) {
   $Thereferrer=$_SERVER['HTTP_REFERER'];
   }
  $theIPAddress=$_SERVER['REMOTE_ADDR'];
  
   echo $theIPAddress;
   echo $Thereferrer;
   echo $newQuestion;
   echo $FinalAnswer;
   echo $newdate;
  }
  
  
  $sql = "INSERT INTO theQuestions (ipaddress, referrer, Question, Answer, theDate)     VALUES ('$theIPAddress', '$Thereferrer', '$newQuestion', '$FinalAnswer', newdate)";
  $rs=odbc_exec($db,$sql);
  $result = odbc_exec($sql);
  if (!$result) {exit('Execution failed!');} 
  </code></pre>