Forum Moderators: coopster
Here is my current code...
$add_comment = "INSERT INTO $table values('','$datetime','$name','$comment')";
mysql_query($add_comment) or die(mysql_error());
I've changed it to the following, which doesn't work...
$add_comment = sprintf("INSERT INTO $table values(%s,%s,%s,%s)",
quote_smart($_POST['']),
quote_smart($_POST['datetime']),
quote_smart($_POST['name']),
quote_smart($_POST['comment']));
mysql_query($add_comment);
$add_comment = "INSERT INTO ".$table." values ('','".mysql_real_escape_string($datetime)."','".mysql_real_escape_string($name)."','".mysql_real_escape_string($comment)."')";
mysql_query($add_comment) or die(mysql_error());