title: PHP & MySQL INSERT INTO problem
body: <p>Any ideas why the following code is not adding anything into the database once the user fills out the form?  I'd really appreciate it.</p>
  
  <p>Thank you!</p>
  
  <pre><code>    if($_SESSION['loginSuccess']==1) {
  
          // ============================================================
          // = Create the table of current tasks stored in the database =
          // ============================================================
          $userID = $_SESSION['userID'];
          $result = mysql_query("SELECT * FROM Tasks WHERE userID = '$userID'");
          echo "&lt;div id=\"draggable\" class=\"ui-widget-content\"&gt;&lt;table border='5'&gt;&lt;tr class=\"ui-widget-header\"&gt;&lt;td&gt;&lt;u&gt;Task Name:&lt;/u&gt;&lt;/td&gt;&lt;td&gt;&lt;u&gt;Class:&lt;/u&gt;&lt;/td&gt;&lt;td&gt;&lt;u&gt;Due Date:&lt;/u&gt;&lt;/td&gt;&lt;td&gt;&lt;u&gt;Task Type:&lt;/u&gt;&lt;/td&gt;&lt;/tr&gt;";
          echo $_SESSION['userID'];
          while($row = mysql_fetch_array($result)) {
              $taskName = $row[1];
  
              $class = $row[2];
  
              $taskDueDate = $row[3];
  
              $taskType = $row[4];
  
  
              echo "&lt;tr&gt;&lt;td&gt;'$taskName'&lt;/td&gt;&lt;td&gt;'$class'&lt;/td&gt;&lt;td&gt;'$taskDueDate'&lt;/td&gt;&lt;td&gt;'$taskType'&lt;/td&gt;&lt;/tr&gt;";
          }
          echo "&lt;/table&gt;";
  
          function addNewTask ($name, $class, $dueDate, $type) {
              mysql_query("INSERT INTO Tasks VALUES ('$userID','$name', '$class', '$dueDate', '$type')");
          }
  
      if($_POST['taskName'] != NULL) {
              addNewTask($_POST['taskName'], $_POST['class'], $_POST['dueDate'], $_POST['dueDate']);
          }
  
  ?&gt;
  
  
  &lt;!-- &lt;img border="1" alt="New" src="/newTask.png" id="newTask" onmouseClick="showTaskField"/&gt; --&gt;
  &lt;p&gt;&lt;form name="newTask" method="post" action="index.php" id="newTask"&gt;&lt;br&gt;
      Task Name: &lt;input name="taskName" type="text"&gt; (necessary)&lt;br&gt;
      Class: &lt;input name="class" type="text"&gt;&lt;Br&gt;
      Due Date: &lt;input name="dueDate" type="text" id="datepicker"&gt;&lt;Br&gt;
      Type: 
      &lt;input type="submit"&gt;&lt;/p&gt;&lt;/div&gt;
  </code></pre>