I have an private server.I am making an vote script so if you vote for my private server it adds one point.The script works but it doesn't show in game.I think it doesn't show in game because the column that script edits is an int value.I think it updates it as a text value so it doesn't works.Can you recommend me anything.Please help me.I will appreciate all answers.
<?php
mysql_connect("localhost", "root", "your_password");
mysql_select_db("db_game");
$timeout=60*60*12;
$time=time();
$out=$time-$timeout;
$username=$_POST['username'];
$points1=mysql_query("SELECT pvpscore FROM t_user WHERE name='$username'");
while($row = mysql_fetch_array( $points1 )) {
$points=$row['pvpscore']+1;}
$check_double=mysql_query("SELECT * FROM t_account WHERE name='$username' AND time>$out")or die(mysql_error());
if(mysql_num_rows($check_double)>0){
echo "You already voted. You can vote each 12 hours";
}
else{
header("location:Vote Link");
$vote=mysql_query("UPDATE t_user SET time='$time', pvpscore='$points' WHERE name='$username'");}
?>
Note:Time is a text field and pvpscore is a int(11) field.