- Dec 16, 2005
Tying It All Together
To tie it all together, a simple file needs to be created to act as the communication between the XML HTTP request and PHP objects. This page not only creates the PHP object, it also receives queries and passes variables to dynamically generated methods; in this case, get, save, or delete. A sample query would include a $method and optional $id, $title, and $description variables.
require_once("../classes/Post.class.php"); $post = new Post(); $post->$method($id, $title, $description);
Many possibilities with this group of technologies are yet to be discovered. The web seems young and fresh again, and we’re lucky to be part of this new wave of functionality.