= ( CURDATE() - INTERVAL 1 DAY )");
//$todayresult = mysql_fetch_assoc($ipresult);
//print_r($todayresult);
//var_dump($todayresult);
// just a simple loop to go through each ip returned
while($row = mysql_fetch_assoc($ipresult)) {
// we find an ip that matches
if ($row['ipaddr'] == $ip) {
$iperror = $iperror + 1;
}
}
// we're okay on the ip
if ($iperror == 0) {
// datetime variable
$phpdate = date("Y-m-d H:i:s");
$insertQuery = "INSERT INTO results (submitdate, ipaddr, vote)
VALUES
(\"" . $phpdate . "\", " . // NOW() -- Timestamp
"\"" . $ip . "\", " .
"\"" . $_POST["win"] . "\")"; // voted for one of 4 images
mysql_query($insertQuery) or die(mysql_error());
// Direct to thank you page
//header('Location: http://localhost/contest/ty.php');
//require("ty_eng.php");
//echo "
Thank you for voting!
";
?>
You can only vote once per day.
Thank you for participating!
We're excited to announce the Danganronpa V3 Reverse Cover Contest! Let your voice be heard and vote for your favorite reversible cover artwork to be featured on the back cover of the PS4 and PS Vita edition of Danganronpa V3: Killing Harmony!
Please select a cover image!