include 'conn.php';
if($_POST) { $sql="UPDATE users SET $pass="mysql_real_escape_string($_POST['pass']). " $fname="mysql_real_escape_string($_POST['fname']). " $lname="mysql_real_escape_string($_POST['lname']). " $mi="mysql_real_escape_string($_POST['mi']). " $age="mysql_real_escape_string($_POST['age']). " $course="mysql_real_escape_string($_POST['course']). " $yearlevel="mysql_real_escape_string($_POST['yearlevel']). " WHERE id=" . mysql_real_escape_string($_POST['id']);
if(mysql_query($sql))
{
//this will be displayed when the query was successful
echo "Record was edited.";
}
else
{
die("SQL: " . $sql . " >> ERROR: " . mysql_error());
}
}
I have this kind of very confusing error :
Parse error: syntax error, unexpected 'mysql_real_escape_string' (T_STRING) in C:\xampp\htdocs\beast\beast\edstul.php on line 15
It is very confusing for me.
What are the solution for this guys.
Aucun commentaire:
Enregistrer un commentaire