/include/connINC.php

Description

connINC.php creates connection to database

MySQL credentials are stored inside a function named conn() which allows up to 5 levels of access.

The function conn() returns an active connection to the DB.

Functions
conn (line 47)

Provides active connection to MySQL DB.

One of 5 MySQL credentials are passed to the function as one of the following strings:

  1. admin
  2. delete
  3. insert
  4. update
  5. select
Each level of access should include the capabilities of those below it. MySQL accounts must be setup for each level, with 'select' account only able to access db via 'select' command, and update able to 'select' and 'update' etc. Each credential set must exist in MySQL before it can be used.

The function returns an active connection to the DB.

If no data is entered into conn() function when it is called, the default access is 'admin'.

If only one credential is available, place it in the 'admin' position, and no parameter is required.

  • return: active connection to MySQL db.
  • todo: error logging, or emailing admin not implemented
object Returns conn ([string $access = "admin"])
  • string $access: represents level of access

Documentation generated on Sat, 03 May 2008 19:47:45 -0700 by phpDocumentor 1.4.1