public function __construct() { parent::__construct(); if (!empty($_GET['action']) && $_GET['action'] == 'delete') { $this->deletecomment(); } else { $this->listcomments(); } }
public function __construct() { parent::__construct(); if (!empty($_GET['action'])) { switch ($_GET['action']) { case 'create': $this->addpost(); break; default: $this->listposts(); break; case 'save': $this->savepost(); break; } } else { $this->listposts(); } }
public function __construct() { parent::__construct(); }