title: PHP form not posting
body: <p>This form is not posting values at all and I can't figure out. I have tried using both PHP_SELF and a separate page action but nothing works. All other forms work - so its not a server issue. What am I doing wrong? Thanks. </p>
  
  <pre><code> &lt;form name=\"projects\" action=\"upload.php\" method=\"POST\"&gt;
  
      &lt;?php 
          echo "&lt;tr&gt;
              &lt;td valign = \"top\" bgcolor=\"$row_color\"&gt; $title &lt;/td&gt; 
              &lt;td valign = \"top\" bgcolor=\"$row_color\"&gt; $description &lt;/td&gt; 
              &lt;td valign = \"top\" bgcolor=\"$row_color\"&gt; $academicdiscipline &lt;/td&gt;
              &lt;td valign = \"top\" bgcolor=\"$row_color\"&gt; "; 
  
                  $allowed = $academicdiscipline; 
                  switch ($allowed) {
                  case "Civil and Environmental": 
                    echo "&lt;select name=\"priority\" class=\"priority\"&gt;
                            &lt;option&gt;  &lt;/option&gt;
                            &lt;option value=\"1\"&gt; 1 &lt;/option&gt;
                            &lt;option value=\"2\"&gt; 2 &lt;/option&gt;
                            &lt;option value=\"3\"&gt; 3 &lt;/option&gt; 
                            &lt;option value=\"4\"&gt; 4 &lt;/option&gt;
                            &lt;option value=\"5\"&gt; 5 &lt;/option&gt;
                            &lt;option value=\"6\"&gt; 6 &lt;/option&gt;
                            &lt;option value=\"7\"&gt; 7 &lt;/option&gt;
                            &lt;option value=\"8\"&gt; 8 &lt;/option&gt;
                            &lt;option value=\"9\"&gt; 9 &lt;/option&gt;
                            &lt;option value=\"10\"&gt; 10 &lt;/option&gt;
                          &lt;/select&gt; ";
                    break;
                  case "Electronics": 
                    echo "&lt;select name=\"priority\" class=\"priority\"&gt;
                            &lt;option&gt;  &lt;/option&gt;
                            &lt;option value=\"1\"&gt; 1 &lt;/option&gt;
                            &lt;option value=\"2\"&gt; 2 &lt;/option&gt;
                            &lt;option value=\"3\"&gt; 3 &lt;/option&gt; 
                            &lt;option value=\"4\"&gt; 4 &lt;/option&gt;
                            &lt;option value=\"5\"&gt; 5 &lt;/option&gt;
                          &lt;/select&gt;";
                    break;
                  case "Environment and Management": 
                    echo "&lt;select name=\"priority\" class=\"priority\"&gt;
                            &lt;option&gt;  &lt;/option&gt;
                            &lt;option value=\"1\"&gt; 1 &lt;/option&gt;
                            &lt;option value=\"2\"&gt; 2 &lt;/option&gt;
                            &lt;option value=\"3\"&gt; 3 &lt;/option&gt; 
                            &lt;option value=\"4\"&gt; 4 &lt;/option&gt;
                            &lt;option value=\"5\"&gt; 5 &lt;/option&gt;
                          &lt;/select&gt;";
                    break;
                  case "Mechanical and Materials": 
                    echo "&lt;select name=\"priority\" class=\"priority\"&gt;
                            &lt;option&gt;  &lt;/option&gt;
                            &lt;option value=\"1\"&gt; 1 &lt;/option&gt;
                            &lt;option value=\"2\"&gt; 2 &lt;/option&gt;
                            &lt;option value=\"3\"&gt; 3 &lt;/option&gt; 
                            &lt;option value=\"4\"&gt; 4 &lt;/option&gt;
                            &lt;option value=\"5\"&gt; 5 &lt;/option&gt;
                            &lt;option value=\"6\"&gt; 6 &lt;/option&gt;
                            &lt;option value=\"7\"&gt; 7 &lt;/option&gt;
                            &lt;option value=\"8\"&gt; 8 &lt;/option&gt;
                            &lt;option value=\"9\"&gt; 9 &lt;/option&gt;
                            &lt;option value=\"10\"&gt; 10 &lt;/option&gt;
                            &lt;option value=\"11\"&gt; 11 &lt;/option&gt;
                            &lt;option value=\"12\"&gt; 12 &lt;/option&gt;
                            &lt;option value=\"13\"&gt; 13 &lt;/option&gt; 
                            &lt;option value=\"14\"&gt; 14 &lt;/option&gt;
                            &lt;option value=\"15\"&gt; 15 &lt;/option&gt;
                          &lt;/select&gt; ";
                    break;
                  default: 
                      echo "&lt;select name=\"priority\" class=\"priority\"&gt;
                            &lt;option&gt;  &lt;/option&gt;
                            &lt;option value=\"1\"&gt; 1 &lt;/option&gt;
                            &lt;option value=\"2\"&gt; 2 &lt;/option&gt;
                            &lt;option value=\"3\"&gt; 3 &lt;/option&gt; 
                            &lt;option value=\"4\"&gt; 4 &lt;/option&gt;
                            &lt;option value=\"5\"&gt; 5 &lt;/option&gt;
                          &lt;/select&gt; ";
                    break;
                  default: 
                      echo "&lt;select name=\"priority\" class=\"priority\"&gt;
                                &lt;option&gt;  &lt;/option&gt;
                                &lt;option&gt; 1 &lt;/option&gt;
                                &lt;option&gt; 2 &lt;/option&gt;
                                &lt;option&gt; 3 &lt;/option&gt; 
                                &lt;option&gt; 4 &lt;/option&gt;
                                &lt;option&gt; 5 &lt;/option&gt;
                              &lt;/select&gt;"; } 
  
  
              echo "&lt;/td&gt;&lt;/tr&gt;
           &lt;tr bgcolor=\"#ffffff\"&gt; &lt;/tr&gt;
           &lt;tr bgcolor=\"#902C2E\"&gt; &lt;/tr&gt;"; 
  
        $row_count++; }  
  
   echo"&lt;tr&gt;
    &lt;td&gt;&amp;nbsp;&lt;/td&gt;
    &lt;td&gt;&amp;nbsp;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;&amp;nbsp;&lt;/td&gt;
    &lt;td &gt;&lt;input name=\"reset\" type=\"reset\" value=\"Reset\"/&gt; 
         &lt;input name=\"submit\" type=\"submit\" value=\"Select\"/&gt; 
  &lt;/tr&gt;&lt;/table&gt;" ;  ?&gt;
  &lt;/form&gt; 
  </code></pre>
  
  <p>The upload.php page can upload all other entries but the priorities, which I can't get to POST from the code above. This is the upload.php file: </p>
  
  <pre><code>if(isset($_POST[submit]) &amp;&amp; !empty($_POST[submit])) { 
  
  $fullname = ''.$data[0]["sn"][0].', '.$data[0]["givenname"][0].'';  
  $givenname = ''.$data[0]["givenname"][0].''; 
  $priority = '$_POST[priority]'; 
  
  $sql = "SELECT * FROM flux_student_records WHERE studentname = '$fullname' ";
  $retval = mysql_query($sql) or die(mysql_error());  
  
   if (!$retval) { 
          die('Could not retrieve data: There are no project proposals yet. &lt;br /&gt;&lt;br /&gt; ' . mysql_error());   }
  
      while ($row = mysql_fetch_array($retval)) { 
          extract($row);  }
  
      $sql = "INSERT INTO flux_project_selection( id, studentname, title, academicdiscipline, priority)
              SELECT flux_student_records.id, flux_student_records.studentname, project_proposals.title, project_proposals.academicdiscipline, '$priority'
              FROM project_proposals
              JOIN flux_student_records ON project_proposals.academicdiscipline = flux_student_records.academicdiscipline
              WHERE flux_student_records.studentname = '$studentname'
              AND 'priority' IS NOT NULL
              LIMIT 5"; 
  
      $retval = mysql_query($sql) or die('Error: MySQL query failed. Project has not been added to the database. '); 
  
  echo "&lt;p&gt; Your project selection have been added to the system. &lt;br&gt; You'll be redirected to list of projects in the system. &lt;/p&gt;&lt;br /&gt;";   
  //echo "&lt;meta http-equiv=Refresh content=2;url=index.php&gt;";
  
  
  } 
  </code></pre>