POST JSON Data with AJAX to a Server Running PHP

Over the past couple days I’ve been messing around with sending JSON data back and forth between a web/mobile client and a server running PHP. Here are two little scripts demonstrating how to POST JSON data to a server running PHP with AJAX:
1) sendjson.html
2) receivejson.php