id = $id; if ($_REQUEST['thing']) { $this->doStuff(); } else { $this->dontDoStuff(); } } public function doStuff() { echo 'The id is '.($this->id + $_GET['thing']).'.'; } public function dontDoStuff() { $uri = 'class.example.php'; echo "
No soup for you! id\" onclick=\"ajax('$uri', 'thing', $this->id); return false;\"> Make soup?
"; } } ?>