使用表格中的单选按钮将数据插入数据库?

时间:2014-01-21 11:43:27

标签: php sql

我想通过使用单选按钮将详细信息插入到SQL数据库中。我不知道该怎么做。请帮帮我。

$query = "SELECT * FROM subject ORDER BY sub_name"; 
$result = mysql_query($query);
echo"<form action = demo_form.asp>";
while($row = mysql_fetch_array($result)){ 
echo "

<tr><td><INPUT TYPE = radio NAME = Agreement VALUE = 0> " . $row['sub_name'] . "</td><td>" . $row['sub_day'] . "</td> <td>" . $row['sub_time'] . "</td> </tr>" ;  //$row['index'] the index here is a field name
}

echo "</table> </br>"; 
echo"<input type=submit value=Submit></form>";

0 个答案:

没有答案