03282005 1803 GMT-6

I have been working on something that I thought was pretty simple but 
this just wont work.

I want to see if a username is already in use. So, I compare the posted 
one to one in the db and if one is returned. If a row is returned then 
the username is in use. But its not working.

Wade


    $sql ="SELECT username FROM users WHERE username = ' " . 
$_POST['user_name'] . " ' ";
                $result = mysql_query($sql, $connection);
           
            if ( mysql_num_rows($result) == 1 ) {
                $problemR = TRUE;
                $errorR[] = 'Username is already in use. Please choose 
again.';
            }


[Non-text portions of this message have been removed]



Community email addresses:
  Post message: php-list@yahoogroups.com
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to