|
|
|
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 | | | A Simple Script that stores encrypted messages in databases Categories : PHP, Databases, MySQL, Security | | | 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 | | | 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 | | | Password reminder Categories : PHP, PHP Classes, Databases, MySQL, Mail | | | Password protection for Phorum 3.1.x with userlevels and log. Categories : PHP, MySQL, Authentication, Security | | | Secure Login Categories : PHP, MySQL, Cookies, Security | | | 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 | | | Identify and log search engine access (spiders, robots, etc.) to a page. Categories : HTTP, Environment Variables, PHP, MySQL, Databases | | | A simple script to count and report hits and the last
modification time of an HTML page. Requires MySQL support
(other DBs should work too, except possibly mSQL). Categories : HTTP, MySQL, PHP, Databases | | | create a grid out of <INPUT TYPE=TEXT> then saving to a database. Uses
a 'multi-dimension array', but not really as the array is just one big array
with the index of "[$i][$j]". Have a look at the code and you'll see what I
mean. Categories : PHP, MySQL, Arrays, Databases | | | 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 | | | php-gtk mysql querying tool Categories : PHP-GTK, MySQL, PHP, Databases | | | Simple function to return the number of days in a time span between 2 given dates. Categories : PHP, Date Time, MySQL, Databases | |
|
|