gpt4 book ai didi

PHP MYSQL 表单提交失败

转载 作者:行者123 更新时间:2023-11-29 06:48:32 25 4
gpt4 key购买 nike

<分区>

我正在尝试通过提交表单数据在数据库中创建一个新条目。它没有任何错误地执行了整个代码,但没有在数据库中显示任何新元素。

有人知道发生了什么事吗?

}elseif(isset($_GET["new"])){//add new 
if($_GET['changeme']=="yes") //if user pressed save, then update table
{
$name = $_POST["name"];
$active = $_POST["active"];
$email = $_POST["email"];
$training = $_POST["training"];
$trials = $_POST["trials"];
$BHV = $_POST["BHV"];
$tours = $_POST["tours"];
$pasnr = $_POST["pasnr"];
$pasactivated = $_POST["pasactivated"];
$pastested = $_POST["pastested"];

mysql_query("INSERT INTO Members (name, active, email, training, trials, BHV, tours, pasnr, pasactivates, pastested) VALUES
('$name', '$active', '$email', '$training', '$trials', '$BHV', '$tours', '$pasnr', '$pasactivates', '$pastested')");
//show end text
echo "Edit complete!<br />
<form><input type='button' onClick=\"parent.location='users.php'\" value='OK'></form>";
}else{//user didn't press save

?>
<!--Edit form-->
<form action="users.php?new=1&changeme=yes" method="post">
Name:<br>
<input name="name" type="text" value="name" size="79"><br>
<input type="checkbox" name="active" value="1" />Active
<input type="checkbox" name="BHV" value="1" />BHV
<input type="checkbox" name="pasactivated" value="1" />Pas activated
<input type="checkbox" name="pastested" value="1" />Pas Tested <br>
E-mail: <br>
<input name="email" type="text" value="email" size="79"><br>
Training Dates: <br>
<input name="training" type="text" value="training" size="79"><br>
Trial Dates: <br>
<input name="trials" type="text" value="trials" size="79"><br>
# Tours: <br>
<input name="tours" type="text" value="tours" size="79"><br>
Pas Nummer: <br>
<input name="pasnr" type="text" value="pasnr" size="79"><br>
<input type="submit" name="Submit" value="Create">
<input type='button' onClick="parent.location='users.php'" value='Back to list'>
</form>

<?
}}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com