User Registration Form, Login, Logout – PHP Tutorial




Learn How to Create a User Registration Form in PHP. Get source code from TutsCorner.com: …

source


48 responses to “User Registration Form, Login, Logout – PHP Tutorial”

  1. I've successfully created an account (I can see it in my database), when I log in it just redirects me to the login page, the redirect function to the member.php does not happen. I can access the page if I type it in the address bar. Can you advise me on this issue?

  2. Hello sir i'm getting this error plz solve it help me!!
    Warning: session_start() [function.session-start]: Cannot send session cookie – headers already sent by (output started at C:xampphtdocsluckylogin.php:15) in C:xampphtdocsluckylogin.php on line 37

  3. hi sooraj mohan, please help me to fix with my problems. I've used exactly the same source code and database like you did, but in browser when i entered the value and click login or register button, there is no any action happening . it only shows the form. Can you please tell me what's wrong

  4. In login.php, there is an error.
    if($user == $dbusername && $pass == $dbpassword)
    {

    $_SESSION['sess_user']=$user;

    /* Redirect browser */
    header("Location: member.php");
    }
    Warning: Cannot modify header information – headers already sent by (output started at C:AppServwwwloginlogin.php:19) in C:AppServwwwloginlogin.php on line 45

  5. I've successfully created an account (I can see it in my database), however when I log in it just redirects me to the login page again.

    If I manually direct myself to the member.php page it works fine, however if I try to login it never redirects me.

    I'm sure it's something simple and I'm just missing it.

  6. Hi Sooraj Mohan thanks for great video.
    However im pretty new on php , and im bit confused how does the page (register.php) knows when to give different outputs when user enters or not enters details in fields.

    For example user does not enters the username

    I was looking at the code :

    $sql="INSERT INTO login(username,password) VALUES('$user','$pass')"; // insert user name and password to database

        $result = mysqli_query($con,$sql);

        if($result){
        echo "Account Successfully Created";
        }
        else{
            echo "Failure!";
            }

        }
        else{
            echo "That username already exists! Please try again with another.";
            }

        }
        else{
            echo "All fields are required!";
            }
        }   

    And as I im wondering where in the code does it give different conditions for the different echos

    Thank you in advance

  7. Hello there and thanks for this great tutorial ! im getting these erros 
    1:Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:wampwwwregister.php
    2:Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given

    Any help will be appreciated

      

Leave a Reply