Results 1 to 6 of 6

Thread: can i do this

  1. #1
    Join Date
    Feb 2010
    Posts
    21
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default can i do this

    hiiiiiii

    i am creating an register page i have set that login name and mailid should be different for users to provide that i have set login name and mailid fields to unique.... now what i need is how can i check this using php.....


    any suggestions plzzzzzz

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    You want to make sure login name doesnt equal the mailid field?
    PHP Code:
    if($login_n == $mail_id){
      echo 
    "Its not unique...";

    Jeremy | jfein.net

  3. #3
    Join Date
    Feb 2010
    Posts
    21
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    no what i said is same login name should not be used by the another user

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    1. Store info in a database (or text files if you can't use a database).
    2. When someone new registers, be sure that the info does not already exist in the database: make sure that searching for that email (or anything) returns false.
    3. Ask them to use another email if it did exist; if not, continue.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Feb 2010
    Posts
    21
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I have already set to unique for that fields in database now my question is now i need to check that fields in my php coading how can i do that

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Try to find the email address in the database. If the query returns no results, the email is unique. If you find a match, it is not unique.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •