Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

like button phpAdd Answer

<?php
if($_POST['like']) {
$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" value = "like" name='like'/>
</form>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #button #phpAdd #Answer
ADD COMMENT
Topic
Name
5+3 =