<?php
include 'config.php';
$credits = "400";
$login = $_SESSION['username'];
$check = mssql_query("SELECT AccountID,Name FROM Character WHERE AccountID='$login'");
$row = mssql_fetch_row($check);
if($row[0] != $login) die("YOU DON'T HAVE ACCOUNT");
if($row[1] != $user) die("$user dosen't exist");
else
{
$up = "INSERT INTO VOTE (username,credits) VALUES ('$user','$credits')";
echo "$user now have $credits";
}
?>