I can't tell you how to find the problem.

Source: Internet
Author: User
$sql _insert = "INSERT into Tb_user (Usernc,turename,pwd,email,sex,tel,qq,address,logintimes,regtime,lastlogintime, Ip,yb,usertype,question,answer,truepwd,photo,score) VALUES (' $_POST[USERNC] ', ' $_post[truename] ', ' ". MD5 ($PSW). "', ' $_post[email] ', ' $_post[select] ', ' $_post[tel] ', ' $_post[qq] ', ' $_post[address] ', ' 0 ', '". Date (' y-m-d h:i:s '). "','" . Date (' y-m-d h:i:s '). "','" . $_server[' REMOTE_ADDR '. "', ' $_post[yb] ', ' 0 ', ' $_post[question] ', ' $_post[answer] ', ' $_post[truepwd] ', ' $_post[photo '; ', ' 30 ')";
$res _insert = mysql_query ($sql _insert);
$num _insert = mysql_num_rows ($res _insert);
if ($res _insert)
{
echo "";
}
Else
{
echo "";
}


Reply to discussion (solution)

Information filling point registration can only jump to the system busy, I think it is my own SQL statement problem but can't find out

{
echo "";
}
Switch
{
$msg = Mysql_error ();
echo "";
}
See what's in the pop-up box

It's not a direct blank.

$sql _insert = "INSERT into Tb_user (Usernc,turename,pwd,email,sex,tel,qq,address,logintimes,regtime,lastlogintime, Ip,yb,usertype,question,answer,truepwd,photo,score) VALUES (' $_POST[USERNC] ', ' $_post[truename] ', ' ". MD5 ($PSW). "', ' $_post[email] ', ' $_post[select] ', ' $_post[tel] ', ' $_post[qq] ', ' $_post[address] ', ' 0 ', '". Date (' y-m-d h:i:s '). "','" . Date (' y-m-d h:i:s '). "','" . $_server[' REMOTE_ADDR '. "', ' $_post[yb] ', ' 0 ', ' $_post[question] ', ' $_post[answer] ', ' $_post[truepwd] ', ' $_post[photo '; ', ' 30 ')";
Set broken place???

It's not going to work.

If it is a SQL instruction error, MySQL will give you a hint
If you don't look, how can you?

$msg = Mysql_error ();
echo "";
This game has been added, it's not bouncing.

If the blank is displayed directly, your program has a syntax error and the error display does not open.
You just gave the program fragments, and you can't tell where the problem is.

Require_once ' conn.php ';
if (Isset ($_post["submit") && $_post["submit"] = = "Register")
{

$user = $_post["USERNC"];
$trueuser =$_post["Truename"];
$PSW = $_post["pwd"];
$PSW _truepwd = $_post["Truepwd"];
$email = $_post["email"];
$sex = $_post["select"];
$tel = $_post["Tel"];
$QQ = $_post["QQ"];
$address = $_post["Address"];
$yb = $_post["YB"];
$question = $_post["question"];
$answer = $_post["Answer"];
$photo = $_post["Photo"];
if ($user = = "" | | $trueuser = = "" | | $PSW = = "" | | $PSW _truepwd = = "" | | $email = = "" | | $sex = = "" | | $tel = = "" | | $QQ = = "" | | $address = = "" | | $yb = = "" | | $question = = "" | | $photo = = "" | | $answer = = "")
{
echo "";
}
Else
{
if ($PSW = = $PSW _truepwd)
{
$sql = "Select USERNC from tb_user where USERNC = ' $_post[usernc] '"; SQL statements
$result = mysql_query ($sql); Execute SQL statement
$num = mysql_num_rows ($result); Number of rows affected by statistical execution results
if ($num)//If the user already exists
{
echo "";
}
else//There is no current registered user name
{

$sql _insert = "INSERT into Tb_user (Usernc,turename,pwd,email,sex,tel,qq,address,logintimes,regtime,lastlogintime, Ip,yb,usertype,question,answer,truepwd,photo,score) VALUES (' $_POST[USERNC] ', ' $_post[truename] ', ' ". MD5 ($PSW). "', ' $_post[email] ', ' $_post[select] ', ' $_post[tel] ', ' $_post[qq] ', ' $_post[address] ', ' 0 ', '". Date (' y-m-d h:i:s '). "','" . Date (' y-m-d h:i:s '). "','" . $_server[' REMOTE_ADDR '. "', ' $_post[yb] ', ' 0 ', ' $_post[question] ', ' $_post[answer] ', ' $_post[truepwd] ', ' $_post[photo] ', ' 30 ')";
$res _insert = mysql_query ($sql _insert);
$num _insert = mysql_num_rows ($res _insert);
if ($res _insert)
{
echo "";
}
Else
{

$msg = Mysql_error ();
echo "";
echo "";
}
}
}
Else
{
echo "";
}
}
}
Else
{
echo "";
}
?>
It's all the code, but it's something else that's going to work.

Put $res _insert = mysql_query ($sql _insert);
instead $res _insert = mysql_query ($sql _insert) or Die (Mysql_error ());

Unknown column ' Turename ' in ' field List ' Sum solution

Okay, I got the wrong typo.

Oh, it's too sloppy, but I learned how to find SQL. Thank you, great God.

Turename column does not exist

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.