首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在php中应用多个数据?

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

Stack Overflow用户
提问于 2015-02-24 13:08:37
回答 1查看 33关注 0票数 0

我有我的工作,但仍然有错误,请帮助我…

代码语言:javascript
复制
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());

}

帮帮我……

EN

回答 1

Stack Overflow用户

发布于 2015-02-24 13:12:51

使用此

您的查询在下面使用了wrong.Please

代码语言:javascript
复制
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());

}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28688542

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档