<?php
session_start();
$host = 'localhost';
$user = 'root';
$password = '8******8';
$database = 'tg*****ba';
$conn = mysql_connect($host,$user,$password) or
die('Server Information is not Correct');
//Establish Connection with Server
mysql_select_db($database,$conn) or die('Database Information is not correct');
$InGameName = mysql_real_escape_string($_POST['InGameName']);
$LastVoteTime;
//===When I will Set the Button to 1 or Press Button to register
if(isset($_POST['btnVote']))
{
if(md5($_POST['code']) != $_SESSION['key'])
die("You've entered a wrong code!");
$query = mysql_query("SELECT * FROM entities WHERE Name = '". $InGameName ."'");
if (mysql_num_rows($query) < 0)
{
die("This In game name doesn't exist , please enter your account name not username!");
}
else
{
$date = date('YmdHis');
$row=mysql_fetch_object($query);
$lastvote=$row->LastVoteTime;
$votingpoints = $row->VotsPoints;
$url = "http://www.xtremetop100.com/in.php?site=***********";
if(($lastvote + 120000) < $date)
{
$lastvote = $date;
$votingpoints += 1;
$query = mysql_query("update entities set VotsPoints ='$votingpoints' set LastVoteTime ='$lastvote' WHERE Name = '". $InGameName ."'");
}
else
die("You've Already voted in the last 12 hrs!");
}
}
?>
投票ポイントとlastvotetimeでデータベースを更新しませんが、最初のチェックに合格します(つまり、データベースでアカウントレコードが見つかりました)が、そのコードの最後にそれらを設定しません事前に感謝します