I ran into this issue while doing the exercises in CH 9 trying to create the login page.
Fatal error: Fatal error: Call to undefined method HTML_QuickForm2::Submitted() in C:\xampp2\php\pear\HTML\QuickForm2\Container.php on line 489
I got the above results with my login.php file and the login file from the book.
This is the function that is referenced by the error message.
/** * Appends an element to the container, creating it first * * The element will be created via {@link HTML_QuickForm2_Factory::createElement()} * and then added via the {@link appendChild()} method. * The element type is deduced from the method name. * This is a convenience method to reduce typing. * * @param string $m Method name * @param array $a Method arguments * * @return HTML_QuickForm2_Node Added element * @throws HTML_QuickForm2_InvalidArgumentException * @throws HTML_QuickForm2_NotFoundException */ public function __call($m, $a) { if (preg_match('/^(add)([a-zA-Z0-9_]+)$/', $m, $match)) { if ($match[1] == 'add') { $type = strtolower($match[2]); $name = isset($a[0]) ? $a[0] : null; $attr = isset($a[1]) ? $a[1] : null; $data = isset($a[2]) ? $a[2] : array(); return $this->addElement($type, $name, $attr, $data); } } trigger_error("Fatal error: Call to undefined method ".get_class($this)."::".$m."()", E_USER_ERROR); }
Any suggestions ?
Thanks
Bruce