PHP Tutorials: Register & Login: User registration (Part 6)

Posted by: Admin  :  Category: Php

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

Part of the ‘Register & Login’ Project from PHP Academy. This tutorials walks you through checking if a username has already been registers and returns an error if so

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

25 Responses to “PHP Tutorials: Register & Login: User registration (Part 6)”

  1. Vortex42 Says:

    So clearly described – Really helpful! Thanks, alex! 🙂

  2. ljk1181 Says:

    I appreciate your tutorials but they are hard to follow because you don’t show the whole code. This causes people to get lost when coding. It would help if you scroll through the whole code at the end of your videos.

  3. 8998934 Says:

    if any1 is wondering how they go about resetting the auto increment back to zero, the code is:
    ALTER TABLE ‘table_name’ WHERE AUTO_INCREMENT=”0″

    you run it as a query by using phpmyadmin.

    i had to do this for my “ID” field

  4. xMaGiCXBOX Says:

    Rather than killing the rest of the script with die() , I just put all of the rest in an else{ } statement after the if($count!=0) statement.

  5. XxDJcommanderxX Says:

    having trouble??
    code by me is less complicated!
    $namecheck = mysql_query(“SELECT * FROM users WHERE username=’$username'”);
    while($row = mysql_fetch_array($namecheck))
    {
    die(“User already taken”);
    }

  6. XxDJcommanderxX Says:

    you’re sick working with php thanks man

  7. Jimd5353 Says:

    These tutorials are really helpful. Not only do you know what your talking about but you speak clearly and don’t mumble like some of those other nerds. I can’t even hear what theyre trying to say its so annoying!

  8. ninjafoxinteractive Says:

    Very well explained and easy tutorials. Good testing.

  9. michaelwhitecollar Says:

    Hi if anyone is getting the error: “Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:xampphtdocsbelepes2regis­ter.php on line 21”

    Try this code instead of his:

    $namecheck = mysql_query(“SELECT username FROM users WHERE username=’$username'”);
    $count = mysql_fetch_assoc($namecheck);

    if ($count[‘username’] == $_POST[‘username’])
    {
    die (“Username is already taken!”);
    }

  10. germanUTP Says:

    Hey, excellent tutorial. It’s been really useful. Thanks!!!

  11. Hattlen Says:

    this registration form allows people to have a usernames that includes symbols like &^*+-£

  12. Cantinflat Says:

    6 parts?! come on man!
    D:

  13. shootdatbol08 Says:

    i logged in just to say Thank You.. 😀
    help me alot.. just wonderin if you can make a Uploading and Downloading files on PHP.. 😀
    well THANK YOU very much.. 😀

  14. KuenteWay Says:

    @phpacademy ALEX U ARE DE BEST EVER THANKS VRM MAN!

  15. Hattlen Says:

    a username with a space next to it is not the same as one without
    thumbs up so that alex can see this problem

  16. unitron2005 Says:

    @LDsm2424 Sorry, but I don’t really remember what the problem was anymore, but I do remember, that it was some minor little thing, so make sure you check your code very carefully because even the smallest things can cause problems.
    Good Luck!

  17. LDsm2424 Says:

    @unitron2005 same errors just like mine..
    can you teach me how to meke mine wotk???
    really need your help

  18. unitron2005 Says:

    @vincenttky I managed to get it working since then, but thank you really much for your help. :o)

  19. vincenttky Says:

    @unitron2005 insert mysql_select_db() on top of $namecheck. hope this helps.

  20. TONIACLARA Says:

    Heck out the thousands of profiles for Naughty women mworld5.info

  21. sidney252 Says:

    thankyou!!

  22. nina1bloch Says:

    so you taught me PHP (most if it, i already knew c++ so it was just learning how php use’s values n such) in 1 night, THX:D

  23. unitron2005 Says:

    after finishing the code, I get this error:
    “Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:xampphtdocsbelepes2register.php on line 21”
    PLEASE somebody can tell me what this means? I’m pretty sure that I made the same code phpacademy did, yet I always get this error.
    Thank you

  24. Colteee Says:

    i forgot: when I press “Register” on my page, i put the code from “Register.php”
    (the code inside Form)
    and then the page goes to /register.php and it shows all my code.

  25. Colteee Says:

    Now, I have my login.
    How do I paste it on my website and make it work?

    I tried to paste the code to my site, it bugged.
    And btw, my friends can’t use the links, right? since it’s my localhost :S

    And do I have to portforward anything?
    And 1 more thing, if i want to keep my register-login form online all the time, my PC has to be running all the time or will my website crash?? :S

Leave a Reply

*