question about M. Lemos form script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dr zoidberg

    question about M. Lemos form script

    Hello,

    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?

    TNX!
  • Robert Beier

    #2
    Re: question about M. Lemos form script

    On Tue, 16 Mar 2004 16:58:16 +0100, dr zoidberg wrote:
    [color=blue]
    > Hello,
    >
    > 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?
    >
    > TNX![/color]
    why dont you compare username with the entries in the database?
    something like this...

    $res = mysql_query("SE LECT * FROM table WHERE u_name LIKE $username");
    if($mysql_num_r ows()) $username_exist s = 1;

    if one row is returned, username already is registered.
    hope i didnt misunderstood your problem.
    (and sorry for the bad english, not my mother-language)

    Robert


    Comment

    Working...