您的SQL语法有错误; 查看与您的MySQL服务器版本对应的手册,以便在第29行附近的')'附近使用正确的语法[关闭]

When I run this code, I get the error in the question title:

if($_SERVER["REQUEST_METHOD"] == "POST") {
        $Name_of_the_Donor=addslashes($_POST['Name_of_the_Donor']);
        $Father_Name=addslashes($_POST['Father_Name']);
        $Date_of_Birth = $_POST["bYear"]."-".$_POST["bMonth"]."-".$_POST["bDay"];
        $Gender=addslashes($_POST['Gender']);
        $Mobile_No1=addslashes($_POST['Mobile_No1']);
        $Blood_Group=addslashes($_POST['Blood_Group']);
        $Email_ID=addslashes($_POST['Email_ID']);
        $Password=addslashes($_POST['Password1']);
        $District=addslashes($_POST['District']);
        $Pincode=addslashes($_POST['Pincode']);
        $Weight=addslashes($_POST['Weight']);

        $timezone = "Asia/Calcutta";
        if(function_exists('date_default_timezone_set')) date_default_timezone_set($timezone);
        $Date_of_Registration=date('Y-m-d H:i:s');

        $Ip_Address=$_SERVER["REMOTE_ADDR"];

        mysql_query("INSERT INTO `donor` (
                         `Donor_Id` ,
                         `Name_of_the_Donor` ,
                         `Father_Name` ,
                         `Date_of_Birth` ,
                         `Gender` ,
                         `Mobile_No1` ,
                         `Blood_Group` ,
                         `Email_ID` ,
                         `Password` ,
                         `District` ,
                         `Pincode` ,
                         `Weight` )

                      VALUES (
                      NULL , 
                      '$Name_of_the_Donor' , 
                      '$Father_Name' , 
                      '$Date_of_Birth' , 
                      '$Gender' , 
                      '$Mobile_No1' , 
                      '$Blood_Group' , 
                      '$Email_ID' , 
                      '$Password' , 
                      '$District' , 
                      '$Pincode' , 
                      '$Weight' , 

                      );") or die("<h1>".mysql_error()."</h1>");

    }
echo "<h1><em>Your Registration Successfully Completed please Login</em> </h1>";

You have an extra comma after '$Weight' here:

                  '$Weight' , 

                  );") or die("<h1>".mysql_error()."</h1>");