Hello,

On 03/25/2004 10:19 PM, Dr. Zoidberg wrote:
I'm creating registration service with this great form script for creating forms within Smarty.

Question is how can I validate 'username' against allready registered users in MySQL so that someone cannot register him self if there is another user with that username.

You can always use the ValidateServerFunction parameter to specify the name of a callback function that will make a database query to see if ise there any user name with the value passed to that function. If there is a record with that user name return 0 and the class will set the respective input field as invalid.


--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to