<?php
include("Common.php");
$login = safe($_POST['login']);
$nick = safe($_POST['nick']);
$method = safe($_POST['method']);
$data1 = safe($_POST['data1']);
$link=dbConnect();
$check = mysql_query("SELECT * FROM characters WHERE `login`= '$login' AND `nick` = '$nick' ") or die(mysql_error());
$numrows = mysql_num_rows($check);
if ($numrows != 0 )
{
if($method == "ChangeGold")
{
// Process
mysql_query("UPDATE `characters` SET `gold` = `gold` + '$data1' WHERE `login`= '$login' AND `nick` = '$nick' ");
// Response
echo "Response"; echo ","; echo "OK"; echo ",";
}
}
mysql_close($link);
?>