Well since that topic was made 5 years ago it's a little outdated on php function. I would get rid of this line.
PHP Code:
$_POST['comment'] = addslashes($_POST['comment']);
and change the query string to this.
PHP Code:
mysql_query("INSERT INTO `testimonials`
(`name`,`email`,`text`,`norp`,`date`) VALUES ('"mysql_real_escape_string($_POST['name'])."', '".mysql_real_escape_string($_POST['email'])."', '".mysql_real_escape_string($_POST['comment'])."', '".mysql_real_escape_string($_POST['norp'])."', '".time()."')")or die("MySQL Error!<br>(".mysql_error().")<br>Could not proceed");
header("Location: ".$_SERVER['PHP_SELF']);
That will do normal SQL injection prevention.
Bookmarks