PHP Tutorials: Register & Login: User login (Part 2)


Part of the ‘Register & Login’ Project from PHP Academy. This tutorials walks you through how to process a username and password based login against details found in a database, set a session, and process a logout function.

25 Responses to “PHP Tutorials: Register & Login: User login (Part 2)”

  1. jameswx09 Says:

    @phpacademy i already have notepad++

  2. jameswx09 Says:

    @saadlulu i already have it

  3. saadlulu Says:

    @jameswx09 or u can use something called “notepad++” a free software.

  4. phasoladas Says:

    Php its unhappy with
    $numrows = mysql_num_rows($query);
    echo $numrows;

    I’am getting this error

    Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given.

    searching google and I can’t figure out what cause this error.

  5. ashperfectimage Says:

    Visit my channel. I offer a Free PHP User Registration System including: Log in, Log out, Register New User, Update User Profile

  6. SeekingWarez Says:

    All the years I have been coding, fetch_assoc always makes me laugh.

  7. hallwalker1992 Says:

    nice tut!

  8. fbixz Says:

    @NUKE547 me too do yo figure it out?

  9. mrsmango84 Says:

    Tried this word for word but it’s not doing anything :S
    I’ve tried putting the right username in and tried fake username etc but nothing. Don’t get error messages page just refreshes and no action.
    Great tutorial though.

  10. BenjaminNewob Says:

    I would never have been able to do this without you. Thank you. First time in a long time that I subcribed to some one who really really deserves it.

  11. willfrill2 Says:

    it just says user does not exist all the time when it realy does lol any sugestions

  12. Dahudrox Says:

    Great videos, helping me out heaps in my studies of php and MySql,

    But, are you using PHP 5?? because this didn’t work for me until I changed…

    if ($numrows !=0) to if ($numrows !=1)

    Has anyone else had this problem?

  13. flangofas Says:

    thanks alex you are amazing man, brilliant job!! the way you explain things, rare ppl can achieve it. Well done

  14. fOreaLmidick Says:

    single quotation problem

  15. Wouthoogervorst Says:

    @freid001 plz help : whats wrong: $query = mysql_query(“SELECT * FROM Game WHERE user=’$myusername”);

    plz help : whats wrong: $query = mysql_query(“SELECT * FROM Game WHERE user=’$myusername’”);

    youve forgot one

  16. Wouthoogervorst Says:

    Good Vids !

    keep on the good work !

  17. bountyhuntertarmon Says:

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /public_html/login.php on line 22

    I don’t see the problem, I have gone over the video a few times now, and rewritten the php but still i get this error message. Any help will be appreciated!
    Thanks

  18. gtaWorfox Says:

    @freid001 You can’t have both as “”, you need to have atleast one of each i.e.

    $query = mysql_query (“SELECT * FROM users WHERE username=’$username’”);

  19. freid001 Says:

    thx i got it working thx so much this is the only one i have found that attachaly works thx!!!!!

  20. freid001 Says:

    i get this problem $end

  21. freid001 Says:

    plz help : whats wrong: $query = mysql_query(“SELECT * FROM Game WHERE user=’$myusername”);

  22. freid001 Says:

    what do u set $query as ????

  23. craterdude Says:

    it worx!

  24. NUKE547 Says:

    When i try to log in it doesnt say anything for when i put real username or fake username. page just stays blank

  25. eaglesphere03 Says:

    what is md5?

Leave a Reply