Here is the Table i Created in database...
CREATE TABLE `a1878876_uonrm`.`saveproposal` (
`ID` INT( 20 ) NOT NULL AUTO_INCREMENT ,
`PI` VARCHAR( 500 ) NOT NULL ,
`Email` VARCHAR( 200 ) NOT NULL ,
`RTitle` VARCHAR( 500 ) NOT NULL ,
`Coauthors` VARCHAR( 500 ) NOT NULL ,
`ExSummary` VARCHAR( 500 ) NOT NULL ,
`LReview` VARCHAR( 500 ) NOT NULL ,
`Objective` VARCHAR( 500 ) NOT NULL ,
`Methodology` VARCHAR( 500 ) NOT NULL ,
`EOutput` VARCHAR( 500 ) NOT NULL ,
`References` VARCHAR( 500 ) NOT NULL ,
`RDuration` VARCHAR( 500 ) NOT NULL ,
PRIMARY KEY ( `ID` )
) ENGINE = MYISAM COMMENT = 'This Table save the proposals'
Here is the PHP Code to insert data into table.....
$sqldel = "DELETE FROM saveproposal WHERE PI='$peru' AND RTitle='$title' AND Email='$email'";
$resdel = mysqli_query($con, $sqldel);
$sqls = "INSERT INTO saveproposal (ID, PI, Email, RTitle, Coauthors, ExSummary, LReview, Objective, Methodology, EOutput, References, RDuration) VALUES (NULL, '$peru', '$email', '$title', '$auth', '$eta', '$pta', '$ota', '$mta','$eota','$rta','$rdt');";
$result = mysqli_query($con,$sqls);
if($result)
{
header("Location:http://mdskhan.netau.net/subdone.php");
}else{
$erro ="$peru,$email,$title,$auth,$eta,$pta,$ota,$mta,$eota,$rta,$rdt";
echo "Data is:".$erro;
echo "SQL Query to execute: $sqls";
die('Invalid query: ' . mysql_error());
}
Here is the out put i am getting.... Insetead of data insert...
OUTPUT:
Data is: Mohammed Shafakhatullah Khan,shafakhat@unizwa.edu.om,One,Nine,Two,Three,Four,Five,Six,Seven,Eight
SQL Query to execute: INSERT INTO saveproposal (ID, PI, Email, RTitle, Coauthors, ExSummary, LReview, Objective, Methodology, EOutput, References, RDuration) VALUES (NULL, 'Mohammed Shafakhatullah Khan', 'shafakhat@unizwa.edu.om', 'One', 'Nine', 'Two', 'Three', 'Four', 'Five','Six','Seven','Eight');
Invalid query:
Please help me out!!!!!! I don't understand why INSERT QUERY IS NOT WORKING