<?PHP
$time = $_POST['Time'];//The things in the [] can be anything you want, but remember these for later
$xp = $_POST['X'];
if($time <= 0)
$time = 0;
if($xp <= 0)
$xp = 0;
$db_handle = mysql_connect($server, $user_name, $pass_word);
$db_found = mysql_select_db($database, $db_handle);
if ($db_found) {
$SQL = "SELECT * FROM table1 WHERE Script = MyScript";//Or whatever you called your table and script
$result = mysql_query($SQL);
if($result){
while ($db_field = mysql_fetch_assoc($result)){
$time = $db_field['Time'] + $time;
$xp = $db_field['XP'] + $xp;
}
$SQL = "UPDATE `table1` SET `XP` = '".$xp."', `Time` = '".$time."' WHERE `Script` = MyScript";//You need to put all of your variables in this.
$result = mysql_query($SQL);
if($result)
print "True";
else
print "False";
}else
print "Table not found";
}else
print "Database not found";
?>
So this is the PHP I'm running. It should work as it does for others, except it says the table isn't found?
Heres the database:
The user associated with the db has full privaledges etc.
Any reason it wont work? thanks