require("mysql.class.php");
if($userid!="")
{
$ID = uniqid("userID");
//$db = mysql_connect("localhost","root","");
$db->dbconnect($db->dbbase,0);
//mysql_select_db ("test");
$strSql="insert into user (id,username,userid,password,email,department,tel) values ('$id','$username','$userid','$password','$email','$department','$tel')";
//$result = mysql_query ("insert into user (id, username, userid, password, email,department,tel)VALUES ('$ID','$username','$userid','$password','$email','$departmen','$tel')");
$result=$db->dbquery($strSql);
if(!$result)
{
echo "出现错误:", mysql_error();
exit;
}
if($result)
{
//mysql_close($db);
$db->dbclose();
echo "用户 $username 注册成功";
print('');
}
}
else
{
echo "资料填写不完整,请仔细填写!";
?>