This is the PHP script
<?php
$mysqlDatabaseName = "gameroom";
$mysqlUsername = "root";
$mysqlPassword = "";
mysql_connect('localhost', $mysqlUsername, $mysqlPassword) or die(mysql_error());
mysql_select_db("gameroom") or die(mysql_error());
if(isset($_GET['query']))
{ $Query = $_GET['query'];
$Query = mysql_real_escape_string($Query);
$Result = mysql_query($Query);
$rows = array();
while($r = mysql_fetch_assoc($Result))
{ $rows[] = $r;
}
echo json_encode($rows);
}
?>