= ( 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) {
date_default_timezone_set("UTC");
// 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!
";
?>
Thank you for voting!
You can only vote once per day.
Thank you for participating!
The legendary Ys VIII: Lacrimosa of DANA, arrives on the Nintendo Switch™ this summer!
Vote for your favorite reverse cover design now, and get it with your preorder of the Adventurer's Edition from your favorite game retailer!