Wenn ein Wert von HTML-Auswahlliste in PHP eine variable

Ich habe folgenden code in meinem php-Seite
Ich bin versucht zu speichern, der Wert der Auswahl-Liste eine variable in mein php-Seite.

Kann jemand bitte helfen?

    $state_list= <<<HTML <select name="state">
    <option value="0"></option>
    <option value="1">ok</option>
    <option value="2">not-ok</option>
    </select>
    HTML;

echo "<table>";
        while($row = mysql_fetch_array($result1))
          {
          echo "<tr>";
          echo "<td>" . $row['task'] . "</td>";
          echo "<td>" . $row['task_desc'] . "</td>";
          echo "<td>";  echo $state_list; echo "</td>";
          echo "</tr>";
          }
 echo "</table>";

        if(isset($_GET['state'])) {
        $stat=$_GET['state'];
        echo $stat;
        }

InformationsquelleAutor Hasitha | 2012-11-05

Schreibe einen Kommentar