private function render_head() { /* * begin HTML rendering... */ dom::init($this); dom::push_body(); /* * this displays the last error that mySQL encountered, if any, * and displays it. else it displays the user message if any. * * This works pretty well assuming that a single query/operation is * mode per POST. */ $mysql_error = $this->get_error(); $message = $this->get_message(); if ($mysql_error) { dom::push_div('error'); dom::h3('', $mysql_error); dom::pop(); } else { if ($message) { dom::push_div('message'); dom::h3('', $message); dom::pop(); } } /* * clear message and error */ $this->set_error(null); $this->set_message(null); }