Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting
T_STRING or T_VARIABLE or T_NUM_STRING while using intval
Hello im using php and getting this error on my code:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting
T_STRING or T_VARIABLE or T_NUM_STRING
The error was pointing on this line of code:
$dislikesNew = $dislikes + intval($_POST['dislikes']);
The whole code:
$stmt = $mysqli->prepare($sql) or trigger_error($mysqli->error."[$sql]");
$stmt->bind_param('s', $id);
$id = $_POST['id'];
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($likes, $dislikes);
` $stmt->fetch();
$dislikesNew = $dislikes + intval($_POST['dislikes']);
$likesNew = $likes + intval($_POST['likes']);
I google my error code but i couldnt find anything the helped me.
Thank for helping.
No comments:
Post a Comment