php - Like/Dislike system like FB -
php - Like/Dislike system like FB -
i have tables set , design wanted...the thing in way of creating sexy like/dislike scheme site actual php take (dont worry wrote bunmch of code, not sending)
my problem code isnt sending of tables, question how send db?
here's code have in place far (along button)
button
<form action="up.php"> <input type="image" value="upbtn" name="upbtn" id="upbtn" src="images/add.png"> </form>
actual code (up.php)
<?php require 'connect2.php'; if (isset($_post['upbtn'])) { mysql_query("insert votes (id, user, upvote, downvote) values ('', '$username', '+ 1', '+ 0')"); mysql_query("update searchengine set rel = rel '+ 1' id = '$id'"); } ?>
$user name def (on top of page of code on)
if (isset($_session['id'])) { $userid = $_session['id']; $username = $_session['username'];
$id defined on page since of on page wanted votes appear
try adding method="post"
form tag. if still doesn't work, should set debugging code within if statement see if queries beingness run.
php mysql vote
Comments
Post a Comment