gpt4 book ai didi

php - 如何在php中应用多个数据?

转载 作者:行者123 更新时间:2023-11-29 22:56:27 25 4
gpt4 key购买 nike

我正在工作,但仍然出现错误,请帮助我...

if(isset($_POST['add']))
{
$id=$_POST['id'];
$bfcp=$bfcp=$_POST['bfcp'];
$casualwear=$_POST['casualwear'];
$popularity=$_POST['popularity'];
$formalwear=$_POST['formalwear'];
$talent=$_POST['talent'];
$questionandanswer=$_POST['questionandanswer'];
$Total= $bfcp + $casualwear + $popularity + $formalwear + $talent + $questionandanswer;
$sql="INSERT INTO criteria (id, bfcp, casualwear, popularity, formalwear, talent, questionandanswer, Total)
values('$id','$bfcp','$casualwear','$popularity','$formalwear','$talent','$questionandanswer','$Total')
,('$id','$bfcp','$casualwear','$popularity','$formalwear','$talent','$questionandanswer','$Total')";mysql_query($sql,$conn)or die(mysql_error());

}

请帮助我......

最佳答案

使用这个

您的查询有误。请使用下面的内容

if(isset($_POST['add']))
{
$id=$_POST['id'];
$bfcp=$bfcp=$_POST['bfcp'];
$casualwear=$_POST['casualwear'];
$popularity=$_POST['popularity'];
$formalwear=$_POST['formalwear'];
$talent=$_POST['talent'];
$questionandanswer=$_POST['questionandanswer'];
$Total= $bfcp + $casualwear + $popularity + $formalwear + $talent + $questionandanswer;
$sql="INSERT INTO criteria (id, bfcp, casualwear, popularity, formalwear, talent, questionandanswer, Total)
values('$id','$bfcp','$casualwear','$popularity','$formalwear','$talent','$questionandanswer','$Total'");
mysql_query($sql,$conn)or die(mysql_error());

}

关于php - 如何在php中应用多个数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28688542/

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