I am working on a voting system with personal vote links. I want to make the personal vote page to register IP and make sure the IP can only vote once per day per person( creator ). The vote page looks like this:
http://forum.thestronghold.nl/vote4creators.php
Can someone help me fix the vote link page? For now it looks like this:
$sql = "UPDATE `DB3121646`.`vote4creator` SET `Votes` = Votes +1 WHERE `vote4creator`.`id` = 6;";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo " Creator : " . $row["Creator"]. " "." Votes : ".$row["Votes"]."<br>";
}
} else {
echo "";
}
$conn->close();
?>
<?php
/* Redirect browser */
header("Location: http://forum.thestronghold.nl/vote4creators.php");
/* Make sure that code below does not get executed when we redirect. */
exit;
?>
what you have to do is (simple, but not ideal solution):
additional you can:
i hope it will guilde you to solve your problem.
btw: uncle google if full of examples how to do that in many ways ;)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.