webfulcreations supports this item


This author's response time can be up to 1 business day.

Popular questions for this item

How to secure a page for specific level?

1) Secure page for admin
    //This loads system.
2) Secure page for specific user level
    //This loads system.
3) Secure page but all members with login status can view.
    //This loads system.

How to print specific values e.g name, last name status, type, profile image?

1) Get user edit profile link.

<a href="edit_profile.php?user_id=<?php echo $_SESSION['user_id']; ?>">Edit Profile</a>

2) Get Logout link

<a href="dashboard.php?logout=1">Logout</a>

3) Get Welcom message?

Welcom <?php echo $_SESSION['first_name'].' '.$_SESSION['last_name']; ?>
4) Other values
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']
Profile Image: $_SESSION['profile_img'];

How to give Partial content access to specific content area in a page?

You can use function partial_access(‘accesslevel’) This function returns true or false. See example below

<?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; ?>

Creating forms to register for different user level? Instead of subscriber default level.

Every user by default register as subscriber from register.php to change it you can open register.php and find following line.

<input type="hidden" name="user_type" value="subscriber" />

In This code deafult value is subscriber you can change it to anything you want.

You can copy register.php name it anything and make a registration page for different level of user just change value of user_type in above field.

How visitor can select his user type on registration from multiple user types?

You can create a drop down let’s say your system have 4 types of users which you created in user levels from your admin dashboard admin, teacher, student, guest. Now you want user to select his type during registration. You can use the following code in your register.php form.

    <select name="user_type">
        <option selected value="subscriber">Subscriber</option>
        <option value="student">Student</option>
        <option value="teacher">Teacher</option>
    -- Do not forget to remove hidden user_type field if you do this. --

Check if user is loged in or not?

By using following if condition we can check if user is loged in or not.

if(isset($_SESSION['user_id']) && $_SESSION['user_id'] != '') { 
    //Here you can do for loged in user.
} else { 
     //Here you can do when user is not loged in

Show more

Contact the author

This author provides limited support for this item through this item's comments.

Item support includes:

  • Availability of the author to answer questions
  • Answering technical questions about item’s features
  • Assistance with reported bugs and issues
  • Help with included 3rd party assets

However, item support does not include:

  • Customization services
  • Installation services

View the item support policy