registerrule calls a function that needs multiple variables

From: Date: Thu, 26 Nov 2009 11:19:40 +0000
Subject: registerrule calls a function that needs multiple variables
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-30174@lists.php.net to get a copy of this message
I am using a quickform for user login whereby the user enters username and password. I want to define a rule that validates the username / password combination against the database, but can't seem to find how to pass both parameters to the function. $loginform->registerRule('validatelogin','function','validLogin'); $loginform->addRule('username', 'Invalid Username Password Combination', 'validatelogin'); function validLogin($username, $password) { // validate against database } Maybe someone could direct me Thanks Andrea

« previous php.pear.general (#30174) next »