The user authentication system is available as a free download.
- 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';
}
- Copy all of the files (except database_and_tables.sql) onto your web server into an appropriate directory (eg 'user_auth').
- 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
|
|
|