WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search


Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder



Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : A login page that require username, password and userlevel.
Categories : PHP, Security, Sessions, MySQL, Databases
ROMEL CUZON
Date : Oct 04th 2005
Grade : 3 of 5 (graded 31 times)
Viewed : 89519
File : 4234.zip
Images : No Images for this code example.
Search : More code by ROMEL CUZON
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

Modify this to suit your needs.


Installation

Unzip the file to your root directory. If you want to place the script to other directory
make sure to edit the include() function of every script pointing to full valid directory of the included file.


In your MySQL database you have something like this.
mysql> select * from acct\g
+--------------+------------+-----------------------+-----------+
| uname        | pname      | name                  | userlevel |
+--------------+------------+-----------------------+-----------+
| test         | test       | test                  | 1         |
| Administrator| admin      | Administrator         | 2         |
| guest        | guest      | Guest                 | 3         |
+--------------+------------+-----------------------+-----------+



usage: test.php

you must include this two lines prior to your protected web content;
<?
$userlevel
[]=1;
//you may use $userlevel=array(1,2,3,4);
include('security.php');
// you may put the full path of security.php
//example include('c:/inetpub/wwwroot/security/security.php);
?>



Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0
Categories : PHP, Sessions, Databases, MySQL
Simple PHP Form Auto Generation based on MySQL query
Categories : PHP, Form Processing, Databases, MySQL, Sessions
bookmarker - PHP, PHPLIB, MySQL WWW based bookmark manager
Categories : MySQL, PHP, MySQL, Complete Programs, Databases
A Simple Script that stores encrypted messages in databases
Categories : PHP, Databases, MySQL, Security
This program allows you to upload an ODBC ressource - i.e. an MS-Access database to a MySQL server.
Categories : Databases, MySQL, Complete Programs, PHP, Databases
A Simple sign up script with PHP and JavaScript validations.
Categories : PHP, Java Script, MySQL, Databases
How to thread a list of messages in database and show it in a treelike structure
Categories : PHP, MySQL, Databases
for each record, do this to the first record, and do that to any subsequent record
Categories : PHP, Databases, MySQL, Beginner Guides
Create and restore backup of MySQL databases
Categories : MySQL, Databases, PHP, PHP Classes, Complete Programs
Checks Date-Input from HTML-Forms and converts to YYYY-MM-DD Format for MySQL Date-Fields
Categories : MySQL, Date Time, PHP, Databases
AITSH Download
Categories : PHP, Complete Programs, MySQL, Databases
AJAX Data Grid System using php and mysql. A complete login system with the ability to display data in a grid using ajax. Add , update and delete the records without reloading the page.
Categories : PHP, AJAX, Databases, MySQL, Java Script
A very simple and efficient split bar the B-Z bar , for mysql and php ... Tired of obfuscated code try this one ...
Categories : PHP, Databases, MySQL, Algorithms
Securing Web Forms with Simple PHP-CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart)
Categories : PHP, Security, GD image library, Sessions
Displaying records of database in more than one page (paging)
Categories : Databases, MySQL, PHP