Code Comments
Programming Forum and web based access to our favorite programming groups.Hello,
I am doing a registration system using DataObject and HTML_QuickForm.
It's a bit strange, but all of the sudden, my custom rule stopped
working.
To be precise, the DataObject inside throws out a message:
DB_DataObject Error: No database name / dsn found anywhere
Offending script:
function username_exists($element_name, $element_value) {
$check_username = new DataObject_Protocols_users;
$check_username->username=$element_value;
$num_results = $check_username->find();
if ($num_results == 0) {
return true;
}
else {
return false;
}
}
It works just fine once I take the script out of function....
So, what is it, I am missing here?
Tomek
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.