global $form not working on php5
| From: | Nicolas de Bari Embriz Garcia Rojas | Date: | Tue, 31 Jan 2006 01:38:48 +0000 |
| Subject: | global $form not working on php5 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-22735@lists.php.net to get a copy of this message | ||
Hi am migrating to a php5 server but all my code that uses html_quickform is not working
the code has some registerRules like:
$form->registerRule('check_login','function','checkNewLogin');
and the checkNewLogin function has something like this:
function checkNewLogin($signup) {
global $form;
print_r($form);
$signup->setLogin($form->getElementValue('login'));
$signup->setEmail($form->getElementValue('email'));
return $signup->checklogin();
}
i have put a print_r($form) and notice that the var is empty but this only happends on php5, any idea on how to keep using form, or getElementValues on php5?
regards