如何使用HTML Select标记将数据插入mySQL?

时间:2017-09-12 08:24:44

标签: php html mysql

我正在使用HTML和php从文本字段向MySql插入数据并选择标签,但select标签中的数据插入零。我错过了什么?

<input type="text" size="30" name="appid" maxlength="8" placeholder="ID Number..."</>
<select name="appamount">
		 <option value = "1000"> 1000 </option>
		 <option value = "2000"> 2000 </option>
</select>
		
<input type="submit" value="SUBMIT"/>

    $Your_Name = ($_POST["apppname"]);
$Your_Amount = ($_POST["appamount"]);

{
    $mysql_qry = "INSERT INTO sample.details (name, amount) VALUES ('$Your_Name', '$Your_Amount')";  

    if ($conn->query($mysql_qry) === TRUE) 
    {
        echo "<h1>Request Received. </p> 

0 个答案:

没有答案