提示成功,但数据库中没有数据,直接执行SQL没有问题 <?php // By include_once './include/db.class.php'; $db=new db();
$sql_t_customer="insert into t_customer(F_name,F_password,F_sex,F_email,F_zjmc,F_zjhm,F_age,F_phone,F_address,F_postnumber,F_username,F_msn,F_note,f_state,infosource,F_mobil,F_qq,F_xueli,F_jiuDuSchool,f_city,f_country) values('曹小岩','123456','男','[email protected]','身份证','130302198712010415',22,'2345678','地方','066000','caoyan2345','gh','','河北省','百度','13260295422','785740637','的','的','秦皇岛市','海港区')";
1. 防火墙设置?
2. sql server帐户权限 ?我只能想到这两点了。----------------------------------
指点迷津网 http://www.zhidianmijin.com
做测试,新建个简单的表如(nmae),执行插入语句
<?php
// By
include_once './include/db.class.php'; $db=new db();
$sql_t_customer="insert into t_customer(F_name,F_password,F_sex,F_email,F_zjmc,F_zjhm,F_age,F_phone,F_address,F_postnumber,F_username,F_msn,F_note,f_state,infosource,F_mobil,F_qq,F_xueli,F_jiuDuSchool,f_city,f_country) values('曹小岩','123456','男','[email protected]','身份证','130302198712010415',22,'2345678','地方','066000','caoyan2345','gh','','河北省','百度','13260295422','785740637','的','的','秦皇岛市','海港区')";
$result1=$db->query($sql_t_customer); //插入t_customer 表
if(!$result1){ //失败回滚!
$sql_t_customer="delete from t_customer where F_username='$uname'";
$db->query($sql_t_customer);
echo "<br/>"."注册失败"."<br/>";
}else{
echo "注册成功~~~~~~~~~~~~~~~~~~";
}?>