Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) 1

Parse error: syntax error, unexpected ” (T_ENCAPSED_AND_WHITESPACE), expecting ‘-‘ or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)

echo $sqlupdate1 = "UPDATE table SET commodity_quantity=$qty WHERE user='".$rows['user']."' ";

Here is what the above code is Doing:
1. It’s getting the user’s name from the table.
2. It’s getting the quantity of the commodity from the table.
3. It’s getting the quantity of the commodity from the form.
4. It’s subtracting the quantity of the commodity from the table from the quantity of the commodity from the form.
5. It’s updating the table with the new quantity of the commodity.

Similar Posts