I wanna create a table in my PhpMyAdmin to be able to use this code …
if($_POST['like'])
{
echo "BlahBlahBlah.";
$sql = "UPDATE table set `likes` = `likes`+1 where `product_id` = '1'";
$result=mysql_query($sql);
}
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="POST">
<input type = "submit" name="like" value = 'like'"/>
</form>
I would do it like this:
Table name: “table”
fields:
auto increment is not required but is advisable. Also you might want some additional fields in there with extra info.