= = 代码运行没有错误(除了注释掉的跳转)但数据就是不会写入MYSQL user1 user2 但user3可以正常写入。。

= = 代码运行没有错误(除了注释掉的跳转)但数据就是不会写入MYSQL user1 user2 但user3可以正常写入。。
绝望了。。。帮帮忙啊~

<?php
session_start();
if($_POST["password"] !="" &&  $_POST["eml"]!=""&&$_POST["name"]!=""){
if(strtoupper($_POST["code"])==strtoupper($_SESSION["code"])){
    if($_POST["password"] == $_POST["passwordTWO"]) {
     $mysqli=new mysqli("localhost", "lzm", "123456", "lzm");
      $sqlone="insert into user1(name, eml, password, shijian) values(?,?,?,?)";
     $sqltwo="insert into user2(class, sex, jiaxiang, birthday,head,ziwojieshao) values(?,?,?,?,?,?)";
      $sqlthree="insert into user3(jinyan, caifu) values('0','1000')";
       $stmtone=$mysqli->prepare($sqlone);
       $stmtone->bind_param("ssss", $name, $eml, $password, $shijian);
        $name = $POST_["name"];
        $eml = $POST_["eml"];
        $password = md5($POST_["password"]);
        $shijian = time();
    $stmtone->execute();
   $stmtone->close();
  $mysqli->close();

$mysqli=new mysqli("localhost", "lzm", "123456", "lzm");
   $stmttwo=$mysqli->prepare($sqltwo);
  $stmttwo->bind_param("ssssss",$class,$sex,$jiaxiang,$birthday,$head,$ziwojieshao);
        $class = $POST_["class"];
        $sex = $POST_["sex"];
        $jiaxiang = $POST_["jiaxiang"];
        $birthday = mktime(0,0,0,$POST_["birthdaytwo"],$POST_["birthdaythree"],$POST_["birthdayone"]);
        $head = $POST_["head"];
        $ziwojieshao = $POST_["ziwojieshao"];
    $stmttwo->execute();
   $stmttwo->close();
    $mysqli->close();

  $mysqli=new mysqli("localhost", "lzm", "123456", "lzm");
   $result=$mysqli->query($sqlthree);
   $mysqli->close();
// header("location:index.php");
    }else{echo "两次密码输入不同";}
   }else{echo "验证码错误";}
}else{echo "亲~前面带*号的项目务必填写";}

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<title>账号注册表</title>

<script src="ajax.js"></script>
<script>
function show(eml){
if(eml==""){
  alert("用户账号不能为空!");
  return;
}
var ajax=Ajax();
var userobj=document.getElementById("userid");
ajax.post("form.php", {eml:eml}, function(data){
   userobj.innerHTML=data;
  });
}
function aaa(name){
if(name=="")
  alert("用户名不能为空!");
  return;
}
  function bbb(password){
if(password=="")
  alert("用户密码不能为空!");
  return;
}
</script>
</head>
<body>
<form method="POST" title="账号注册" action="form2.php" enctype="multipart/form-data">
<caption><h2>账号注册</h2></caption>
<p>*邮箱(账号): <input type="text" name="eml" size="20" value=""><span id="userid"></span></p>
<p>*密码: <input type="password" name="password"></p>
<p>请再次输入密码: <input type="password" name="passwordTWO"></p>
<p>------------请谨慎填写以上内容,注册之后以上内容将无法更改--------</p>
<p>*姓名: <input type="text"  size="20" name="name" value=""></p>
<p>*验证码: <input type="text" name="code"> <img src="code.php"></p>
<p>您的性别:男<input type="radio" value=1" name="sex">        
女<input type="radio" name="sex" value="0"></p>
<p>班级:<input type="text" name="class" size="35" value=""></p>
<p>家乡:<input type="text" name="jiaxiang" size="35" value=""></p>
<p>生日:<input type="text" name="birthdayone" size="10" value="">年<input type="text" name="birthdaytwo" size="10" value="">月<input type="text" name="birthdaythree" size="10" value="">日</p>
<p>上传头像:<input type="text" name="T2" size="35"></p>
<p>自我介绍:</p>
<p> <textarea rows="8" name="ziwojieshao" cols="45" value=""></textarea></p>
<p> </p>
<p>    <input type="submit" value="提交" name="B1">    
<input type="reset" value="重置" name="B2"></p>
</form>
</body>
</html>

作者: llzzmm301   发布时间: 2011-08-13

$class = $POST_["class"];


要仔细噢

作者: bigtailfish   发布时间: 2011-08-14

还有一个小地方,meta里面charset utf8是mysql的写法,页面代码里要utf-8

作者: bigtailfish   发布时间: 2011-08-14