1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

PHP LOG IN SCRIPT // Tutorial \\

Discussion in 'Web Development' started by Jaybirddesigns, Apr 10, 2008.

  1. Jaybirddesigns

    Jaybirddesigns New Member

    Don't now if this is the right area to post this, but here you go.

    Login Tutorial.

    Requirements: Be able to create a mysql database, and edit php.

    Note: your server must be able to run php.

    First unzip all the files in this download here:
    http://www.jaybirdfolio.com/LoginScript.html

    Place the folder called login on your server.

    Next, you have to do a little MYSQL work. Within your admin area of your server create a database and call it whatever you want, just remember what you called it, we need it later.

    Next, in your web editor (dreamweaver, notepad, whatever.) open the file that’s called config.php this is how we will connect to the database you just created.

    Enter your information example:


    Code:
    [FONT=Times New Roman][SIZE=3][SIZE=3][FONT=Times New Roman]<?php[/FONT][/SIZE]
    [SIZE=3][FONT=Times New Roman]$server = "localhost";    // server to connect to.[/FONT][/SIZE]
    [SIZE=3][FONT=Times New Roman]$database = "jaybirdf_RealEstate";       // the name of the database.[/FONT][/SIZE]
    [SIZE=3][FONT=Times New Roman]$db_user = "jaybirdf_Admin";   // mysql username to access the database with.[/FONT][/SIZE]
    [SIZE=3][FONT=Times New Roman]$db_pass = "Put your password here";  // mysql password to access the database with.[/FONT][/SIZE]
    [SIZE=3][FONT=Times New Roman]$table = "users";                       // the table that this script will set up and use.[/FONT][/SIZE]
    [FONT=Times New Roman][SIZE=3]?>[/SIZE][/FONT]
    [/SIZE][/FONT]
    Next, Save and upload your config.php file and point your web browser to the file called create.php

    For instance http://www.yoursite.com/login/create.php

    If you did everything correct you should see “Complete”
    This means you created a table within your database and you’re almost done.

    Now all you have to do is place all the secured information you want to hide, until people register of course on members.php page. You can modify the code so that it will point to some other page instead of member.php.

    Let me know if you need further assistance.

    See example Here: http://www.jaybirdfolio.com/login/register.php