JDT

 

FREE Downloads
Articles
Tutorials

 

Using PHP and MySQL to Create a User Authentication System - Part 2 - Installation


The user authentication system is available as a free download.

  1. Edit the following section in the user_class.php file, inserting the appropriate values. Contact your service provider if you do not know what values to use.

    function User() {
    $this->dbHost = 'localhost'; // Change this if localhost is not the host
    $this->dbUser = 'root'; // Change this if root is no he user
    $this->dbName = 'test_db'; // Change this is you use a different database name
    $this->dbPass = 'abcd1234'; // Set this to the correct password
    $this->dbUserTable = 'user';
    }

  2. Copy all of the files (except database_and_tables.sql) onto your web server into an appropriate directory (eg 'user_auth').
  3. Run database_and_tables.sql.

    In this step you create the database 'test_db', and the 'user' database table.

    Your service provider's control panel normally has some functionality to enable you to do this. Again, contact them if you are unsure how to run an SQL script.

    Note also that you might need to change 'test_db' to something different in database_and_tables.sql.

Running the User Authentication System

In your browser, navigate to index.php.

Part 1 - Introduction   Part 3 - File Descriptions


Author: Backrubber
John Dixon Technology Ltd

Reference: user_class.php is based on functions described in the book 'Apache, MySQL, and PHP Web Development for Dummies', by Jeff Cogswell (ISBM 0-7645-4969-3).







Go back to MySQL Tutorials home page

Go back to Tutorials home page



Earnings Tracker is John Dixon Technology's FREE accounting and bookkeeping software tool.

Aimed at contractors and freelancers, Earnings Tracker enables you to perform bookkeeping and accounting tasks, helping you to keep track of your company's revenue and spending.

The software is written in PHP and MySQL and is available to use for FREE online, or as a FREE download.

Earnings Tracker can also be used simply as a dividend, corporation tax, or VAT calculator.

Need free accounting software
 


JDT

Copyright Notice for John Dixon Technology Ltd

Privacy Statement

Terms & Conditions