How to Create Multiuser Login Script with PHP and MySQL

in #utopian-io4 years ago (edited)

What Will I Learn?

In this video we will learn:
Login Multiuser PHP MySQL

Difficulty

Basic

Description

On this occasion I want to create a tutorial on how to create multiuser login script with PHP and MySQL

Login Multiuser PHP MySQL

  • Run XAMPP Control Panel, then enable Apache and MySQL.

download.jpg

  • Access to MySQL database via browser with url: http://localhost/phpmyadmin/

  • Create a table in the database with the name "login multiuser", with 4 fields are "username", "name", "password", and "permissions". And fill the value for each field.
    Can be formed as shown below:
    download (1).jpg

  • Design multiuser login form with PHP script. It looks like the following:

download (2).jpg

To form a multiuser login form that can be accessed through a web browser like the picture above, write the following PHP script in the text editor (notepad):
Save as login script multiuser.php

IMG_20180122_202536.jpg

  • Forms a php script with the name "act login.php", its function is as script login action defined by multiuser.php login script form above.
    Save as act login.php
    IMG_20180122_202733.jpgIMG_20180122_202621.jpg

After login we will be directed to a particular page, because this multiuser login and with different permissions then we must create a page according to the permissions. In this tutorial, the permissions we make there are 2 ie Admin and Manager, then the page that we must create must also have 2, the admin page and page manager.

  • Here's the Admin page and the Manager page:
    download (3).jpg
    In order to perform multiuser login to each page, paste the php script below right at the beginning of the script that forms the design of the Admin and Manager above page views.

For the Admin page, paste the following PHP script:
IMG_20180122_202805.jpg

For the Manager page, paste the following PHP script:

IMG_20180122_202830.jpg

  • To logout multiuser create the following php script:

Save as act logout.php
IMG_20180122_202855.jpg

Sort:  

Your contribution cannot be approved because it does not follow the Utopian Rules.

Your tutorial is not informative.

You can contact us on Discord.
[utopian-moderator]

Coin Marketplace

STEEM 0.50
TRX 0.09
JST 0.064
BTC 50988.33
ETH 4357.29
BNB 585.22
SBD 6.22