<form action="" method="POST">
<input type="text" placeholder="Input1" name="firstInput">
<input type="submit" name="submit">
</form>
<?php
if(isset($_POST['submit'])){
$input=$_POST['firstInput'];
//Here you can run your query make sure to make database connection first
$sql=mysqli_query($con,"query goes here");
}
?>
1条答案
按热度按时间ifmq2ha21#
为此,您可以使用ajax或在同一页面上编写php代码。例如: