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

October 18th, 2010


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.

admin PHP , , , ,

  1. andzlyberry12
    October 18th, 2010 at 23:21 | #1

    how to login on the same page???

  2. nattsurfaren
    October 19th, 2010 at 00:11 | #2

    Something very important if you use cpanel on a shared host.
    Username is not a simple username. You need to enter something like this
    mysql_connect(”localhost”,”account_username”,”password”) or die(”Couldn’t connect”);
    phpMyAdmin allows you to work with simple username but you must combine the users with the account.
    if your user account is ‘dave’ and you database user name is ‘banana’
    You enter ‘dave_banana’ as username.

  3. bears7777777
    October 19th, 2010 at 00:51 | #3

    i get a parse error

  4. iyzy
    October 19th, 2010 at 01:27 | #4

    @h3nno I get the same thing, dont know what I am doing wrong

  5. VolcanicDrum
    October 19th, 2010 at 01:46 | #5

    I’m speechless, simply awesome!!! thank you!!!

  6. Rogueixpresents
    October 19th, 2010 at 02:02 | #6

    @OneAntagonist British accent is the best!!!

  7. motstakim
    October 19th, 2010 at 02:33 | #7

    IDOL!!!!!!!!your the best!!!!i love u!!!!!^^

  8. sam5423
    October 19th, 2010 at 02:46 | #8

    question….everything works, thx a lot. but now i need to transfer everything to a webhost. how do i put the php files i made from your tutorial?..do i just simple copy and paste the code to my html page?

  9. 2006xxl
    October 19th, 2010 at 03:15 | #9

    Can u help me plx

    Can’t connect with db i do it just like u and when u log in always same code please enter and username and password :x
    And now only the shows de code of php

    Ty

  10. MyJackson07
    October 19th, 2010 at 03:59 | #10

    What screen recorder did you use?

  11. mcgyvr2009i
    October 19th, 2010 at 04:45 | #11

    @mcgyvr2009i They still use databases but they use codes to program.

  12. mcgyvr2009i
    October 19th, 2010 at 05:03 | #12

    @Thewebsitemaster1 Bull. The professionals who make bigtime money use nothing but codes. MySQL, PHP, HTML, CSS, JavaScript, AJAX, and a whole lot more. They don’t use phpmyadmin. Or anything else that is a database storage area. They use SQL, and MySQL to store their database. Everything is code activated. If they can do it so can everybody else.

  13. NickDesbarats
    October 19th, 2010 at 05:38 | #13

    Really excellent tutorials. Love the fact that they’re recorded with the small viewport, since I watch them on my iPhone (while eating lunch), and the text is large enough to be legible on a 3.5″ screen…

  14. Thewebsitemaster1
    October 19th, 2010 at 05:56 | #14

    @mcgyvr2009i you can’t without phpmyadmin you need it to do the database to store them in

  15. AndeyC4
    October 19th, 2010 at 06:26 | #15

    U’ r simply the best, better then all the rest :)))))

  16. phpacademy
    October 19th, 2010 at 06:26 | #16

    @OneAntagonist Thank you! :)

  17. OneAntagonist
    October 19th, 2010 at 07:11 | #17

    omgsh i love your accent (:

  18. lolium439
    October 19th, 2010 at 07:13 | #18

    @mcgyvr2009i you could do it all via mysql command line

  19. DjNouton
    October 19th, 2010 at 07:33 | #19

    Why do i get this??:O what is wrong?

    Notice: Undefined index: username in C:wamplogin.php on line 3

    Notice: Undefined index: password in C:wamplogin.php on line 4
    Please enter and username and a password

  20. mcgyvr2009i
    October 19th, 2010 at 08:32 | #20

    How can I do all of this without php-myadmin because my mother wont allow me to install it.

  21. xBenRitchiex
    October 19th, 2010 at 09:22 | #21

    @Dossageable Totally!!! I love his tut’s so much :D!!!!!!!!

  22. h3nno
    October 19th, 2010 at 09:49 | #22

    Hi

    I have created the script, but every time I enter a username and password and click login I recieve the if else die (”Please enter a username and password”);

    Any ideas why it is going straight to that? I have double check all spelling and retyped everything.

  23. akhileshji05
    October 19th, 2010 at 10:31 | #23

    You are an excellent teacher i had ever taught. Keep doing for beginner and experts also. That is a best way to explain.
    That is what i want to implement in my office.

  24. VolcanicDrum
    October 19th, 2010 at 10:39 | #24

    Awesomest dude! great tutorials.

  25. timtvtim
    October 19th, 2010 at 10:49 | #25

    i get a download if i login!

  1. No trackbacks yet.