求大神解释下为什么PHP的数据不能写入到MySQL中
if($_POST['pwd']==$_POST['pwd2']){$m=$this->model();$d=$m->sql("INSERTINTO`zhanghu`(`...
if($_POST['pwd']==$_POST['pwd2']){
$m=$this->model();
$d=$m->sql("INSERT INTO `zhanghu` (`name`,`pwd`) VALUES (".$_POST['name'].",".$_POST['pwd'].")");
// INSERT INTO `zhanghu` (`name`, `pwd`) VALUES ('l', ';ll')
//把VALUES的数据写入INSERT INTO中
if($d){
$d-> success('OK','index.php?c=index');
}else{
$this->error('bad','index.php?c=zhuce');
} 展开
$m=$this->model();
$d=$m->sql("INSERT INTO `zhanghu` (`name`,`pwd`) VALUES (".$_POST['name'].",".$_POST['pwd'].")");
// INSERT INTO `zhanghu` (`name`, `pwd`) VALUES ('l', ';ll')
//把VALUES的数据写入INSERT INTO中
if($d){
$d-> success('OK','index.php?c=index');
}else{
$this->error('bad','index.php?c=zhuce');
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询