I'm creating variables on server 1 and then sending them via post to a mySQL database on server 2 using PHP file located on server 2.
Javascript on server 1...
$.post( "http://www.website.com/xxx/update.php", { vote:currentVote, page:currentmatch, round:roundNumber, team1: firstTeam, team2: secondTeam });
PHP to receive post, located on server 2...
$round = $_POST['round'];
//etc...
//I then set the query and insert the data, no problem.
After that, and on the same PHP file, counting rows and assigning total to variable...
$result = $connection->query("SELECT * FROM {$page} WHERE 'vote' = {$team1}")) {
$team1Count = $result->num_rows;
}
How can I send that updated $team1Count variable back to the original page?
Thanks!