include "db.php";
extract($_POST);
$fname = str_replace("'","`",$fname);
$fname = mysql_real_escape_string($fname); <----
$lname = str_replace("'","`",$lname);
$lname = mysql_real_escape_string($lname);
Is about a registration form for a forum
CodePudding user response:
All mysql_* functions stoped working since PHP7.0, try using mysqli_* function like : mysqli_real_escape_string.
Don't forget to change your mysql_connect to mysqli_connect.
CodePudding user response:
Further to Lka’s message, mysqli_real_escape_string also takes the $db connection as the first parameter.