I have problem to get data from echo table, how to get echo from table and insert to database :
(我有问题要从回声表中获取数据,如何从表中获取回声并插入数据库:)
- this my html file
(这是我的html文件)
<tr>
<td style="width: 22%" name="item_name" value="">
<?php echo $values["item_name"]; ?>
</td>
<td style="width: 10%">
<?php echo $values["item_quantity"]; ?>
</td>
<td style="width: 11%">RM
<?php echo $values["item_price"]; ?>
</td>
<td style="width: 15%">RM
<?php echo number_format((int)$values["item_quantity"] * (int)
</td>
</tr>
- PHP file :
(PHP文件:)
$item_name=$_REQUEST["item_name"];
$item_quantity=$_REQUEST["item_quantity"];
$item_price=$_REQUEST["item_price"];
$total=$_REQUEST["total"];
{
$query = "INSERT INTO `cart`(`item_name`,`item_quantity`,`item_price`, `total`) VALUES ('$item_name','$item_quantity','$item_price', '$total')";
$query_run = mysqli_query($con, $query);
echo '<script>alert("Data Cart Inserted")</script>';
redirect("location: installment.php");
}
How can I do that?
(我怎样才能做到这一点?)
ask by FARIZ translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…