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

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 how to process a username and password based login against details found in a database, set a session, and process a logout function.

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 login (Part 1)”

  1. DERKINSHNOFF Says:

    no matter what username i type in it says “enter username and password”

  2. TheHumanBanana Says:

    whats parse error?? any help?

  3. TheOriginalVZdemon Says:

    all php programmers i invite you to come and visit vzforumz.webs.com the newly found programming community.

  4. mb920906 Says:

    For those having problems seeing their codes when they press Log in.

    First of all copy index.php and login.php to the folder htdocs located in your xampp installation directory. Do not open login.php by right clicking and selecting browser, instead go to browser and type in “localhost/index.php” or “127.0.0.1/index.php”.

    It worked for me. Good luck

  5. jock0man Says:

    oh my problem was that i typed imput not input 😀

  6. jock0man Says:

    im confused i make login form in index.php but the text box and pass box and submit button doesnt show up in my browser

  7. JDANNYPJ Says:

    When i open up localhost its not opening my logo but when i drag the index file into my mozilla firefox browser it does show it, but it wont let me view it properly on localhost and it isn’t showing the changes on localhost either, somebody please help?

  8. sinztenz Says:

    @JDANNYPJ

    thanks a lot. 🙂

  9. JDANNYPJ Says:

    @sinztenz I figured this problem out, you have to copy the context files over to the htdocs folder in the xampp folder…

  10. sinztenz Says:

    @JDANNYPJ

    And now i am having the same thing here as well. any solution already, guys?

  11. JDANNYPJ Says:

    @DriekvdStam I get that aswel, i don’t know what to do.

  12. JDANNYPJ Says:

    I followed this video step by step, but when i click log in it comes up with the code i entered. Somebody, please help?

  13. JMeyN40 Says:

    very objective … like it

  14. Arciijs Says:

    im doin this on my live website and it cant connect but i have gave the right host etc and i really want it to work

  15. Arciijs Says:

    @DriekvdStam cause you are not in your htdocs folder its located in the xampp

  16. DriekvdStam Says:

    When I click login, I get this:

    $username = $_POST[‘username’]; $password = $_POST[‘password’]; if ($username&&$password) { $connect = mysql_connect(“localhost”,”wfuhjtqa_login”,”b8On75ef”) or die (“Database error.”); mysql_select_db(“wfuhjtqa_login” or die(“Database error.”); } ?>

  17. gavin6899 Says:

    Hey…can u help me…well I can’t seem to do the $connect thing and my host is justhost.com is that what I put and the username and password to what?
    Please help I have tryed evrry thing I could think of gdmrox@gmail.com is my email please send ur awnsers there thanks

  18. flamingo512 Says:

    Great Tutorial Thank You Very Much God Bless !!!!

  19. Zaptagious Says:

    When typing in a correct username and password it still says “Couldn’t connect”, please help me, I’ve done everything exactly like in the tutorial…

  20. karenotto Says:

    Loved the tutorial! I’ve been trying to understand this for a week, but googling these things on the internet returns results so broad I could not figure out where to begin. Now I know. Thanks!

  21. jock0man Says:

    even i type in my username and password it dies and shows me the “Please enter username and password!” text im using vertrigo ist very similar to xampp if that could be the problem?? help:)

  22. SonyFan1260 Says:

    @leathecookiemonster
    Because, it has support these langauges:
    Apache-CONF
    ASP
    C/C++
    CSS
    Highlighter Files
    Langage Files
    Foxpro
    Poxpen
    Inno Setup Script
    HTML
    Object Pascal
    PHP
    Visual Basic
    x86 Assembler
    and XML

  23. pplayer666 Says:

    I followed the instructions step by step eventually having created 2 .php files, setting up server and a working mysql database, but when i enter an incorrect login/password and press enter “please enter a username and a password” doesn’t show up. it seems as if either the two files aren’t tied to one another or aren’t connected to the database. please, advise..

  24. leathecookiemonster Says:

    @SonyFan1260 what’s good about using it? out of curiosity 🙂

  25. 2800drengen Says:

    @albad17 You have to run this on a localhost or an actual FTP server with php installed. PHP won’t work without installing in on a server. I would recommend you check out some tutorials on how to setup a localhost. You basically just need an application. PC: “XAMPP” – MAC: “MAMP”

Leave a Reply

*