I have an update function in my website, when I run my update.php the error comes up.
(This is the error)
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\Xampp\htdocs\DBLogistic\update.php on line 9
(Here is my update.php)
<?php
include('connectdb.php');
if (isset($_POST['update'])) {
$sql ="UPDATE tbluser SET userNm='$_POST['newname']', userFullNm='$_POST['newfullname']', userEmail='$_POST['newemail']', userPhone='$_POST['newcontact']', userLvlId='$_POST['newlevel']', userStatus='$_POST['newstatus']' WHERE userId='$_POST['id']'"; //this is line 9
mysql_query($sql, $con);
}
?>
Thank you for help, do ask me for more information if needed.