JSON modification

Started updating PHP to send JSON object and use PDO for MySQL.