Webful Login Script & User management is a kit for web developers and users who dont have much knowledge about coding but want to make login system then make pages secure for specific user types This is best PHP user management system which can help you rapidly develop applications in php. Its ready to use just install easy installation wizard and start making your app or pages secure.
PHP login system is very easy to use you just need to put it in your hosting account and run its installation wizard yes! script know how to install itself 🙂 PHP Login system have unique features so you can redirect different level of users to different pages. Check out demo that will speak itself. PHP login and user management was not this easy before. Its completely secure and user friendly simple system. You can use it in your projects, you can use it in your website to make few pages secure of whole website.
A) Installation
Create database
First of all you need to create a database by visint your cpanel, or webhost given panel. In localhost you can sue phpmyadmin interface. You will need
- Database name
- Database username
- Database password
- Database host if that’s not localhost
Make sure your database is connected with your database user. Once done you need to open /scripts/includes/dbconnect.php file from your download and update information like following.
Upload files
Now you can upload all files from /script/ to your desired directory in server let’s say you uploaded in /admin/. Once all files are uploaded via FTP or anything just run http://yourdomain.com/admin/ and you are ready to install by setting desired info asked in form.
B) Administrator
Admin can
- Add new user
- View all users and sort them with many ways
- Delete, ban, deactivate, suspend and edit user
- Add new user level
- Set page for user level
- View all user levels
- Edit and Delete user levels
- Visit pages of all user levels
Creating new page only accesable to admin
Create a new page let’s say its new_page.php and put anything you want in it. Then you have to add the following code in top of that page then this will be only accessable to admin users.
[php]<?php
include(‘system_load.php’);
//This loads system.
authenticate_user(‘admin’);
?>[/php]
C) Users
Users can signup by reigster.php and activate their account by confirming their email id. Default user level would be assigned subscriber and they would be redirected to subscriber.php after login. Every user can edit their profile. Link is below to edit profile.
[php]<a href="edit_profile.php?user_id=<?php echo $_SESSION[‘user_id’]; ?>">Edit Profile</a>[/php]
Link for logout
[php]<a href="dashboard.php?logout=1">Logout</a>[/php]
Print welcome message on any page.
You can put following code anywhere on any page to say welcome to your users.
[php]Welcom <?php echo $_SESSION[‘first_name’].’ ‘.$_SESSION[‘last_name’]; ?>[/php]
D) Manage user levels
System create a default level subscriber during installation. You can use following code in any file you want give access to subscribers. You can do this with all user levels let’s say manager default page manager.php just change subscriber to manager in following code. You can put following code in top of any file you want to give access to subscribers.
[php]<?php
include(‘system_load.php’);
//This loads system.
authenticate_user(‘subscriber’);
?>[/php]
Giving access to all users. Login required.
[php]<?php
include(‘system_load.php’);
//This loads system.
authenticate_user(‘all’); //This is example please change to your level name.
?>[/php]
Partial Content Access
You can use function partial_access(‘accesslevel’) This function returns true or false. See example below
[php]<?php if(partial_access(‘admin’)): ?>
<p>You are admin</p>
<?php elseif(partial_access(‘subscriber’)): ?>
<p>You are subscriber.</p>
<?php elseif(partial_access(‘all’)): ?>
<p>You are loged in user.</p>
<?php else: ?>
<p>You are not loged in user.</p>
<?php endif; ?>[/php]
E) Sources and Credits
I’ve used the following Scripts in this system.
Support and Basic Information
How to secure a page for specific level?
[php]<?php
include(‘system_load.php’);
//This loads system.
authenticate_user(‘admin’);
?>[/php]
2) Secure page for specific user level
[php]<?php
include(‘system_load.php’);
//This loads system.
authenticate_user(‘levelname’);
?>[/php]
3) Secure page but all members with login status can view.
[php]<?php
include(‘system_load.php’);
//This loads system.
authenticate_user(‘all’);
?>[/php]
How to print specific values e.g name, last name status, type?
1) Get user edit profile link.
[php]<a href="edit_profile.php?user_id=<?php echo $_SESSION[‘user_id’]; ?>">Edit Profile</a>[/php]
2) Get Logout link
[php]<a href="dashboard.php?logout=1">Logout</a>[/php]
3) Get Welcom message?
[php]<?php echo $_SESSION[‘first_name’].’ ‘.$_SESSION[‘last_name’]; ?>[/php]
4) Other values
[php]User ID: $_SESSION[‘user_id’]
First Name: $_SESSION[‘first_name’]
Last Name: $_SESSION[‘last_name’]
Email: $_SESSION[’email’]
User Status: $_SESSION[‘status’]
User Type: $_SESSION[‘user_type’][/php]