I have the following code which updates a field in a database table to add 1 to it. The ID should have a variable being posted to it. Can anyone see where this is going wrong?
EDIT: Sorry, I completely forgot to mention the actual problem. The database is not updating the field.
<?php
$con=mysqli_connect("localhost","**","***","***");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
mysqli_query($con,"UPDATE base SET thumbdown = thumbdown + 1 WHERE id = $_POST['id']");
mysqli_close($con);
?>