Changed the php to use POST requests instead of GET requests, to match the changed javascript