Hi,
Can anyone please tell me whats wrong with this piece of code? I am trying to insert email (user name)in the database. This thing is now getting on my nerves.
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form")) {
$insertSQL = sprintf("INSERT INTO blog (title, specialization, message) VALUES (%s, %s, %s, ".$_SESSION['MM_Username'].")",
GetSQLValueString($_POST['title'], "text"),
GetSQLValueString($_POST['specialization'], "text"),
GetSQLValueString($_POST['words'], "text"));
mysql_select_db($database_con_reg, $con_reg);
$Result1 = mysql_query($insertSQL, $con_reg) or die(mysql_error());
This is producing the following error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@hotmail.com)' at line 1
Can anyone please help me with this piece of code? Any help will be highly appreciated.
Regards,
Bilal A. Khan