The STEEM WATCHER Detectives Reporting Portal (SW Portal) -- Development on Signup/Login/Forget form -- 29/12/2022

in Steem Dev2 years ago

SW Portal.jpg

Hello everyone!

How are you all? I hope my friends will be happy and well. by the grace of God, I am also well. Today I am here with new development of SW portal. In the last post SW portal, I've discussed my working on data fetching from database and some key points about reports.

Today I am going to sharing my development that I have achieved in this week. as you all know, for every project security is the main goal to achieve. Two different tasks have been completed successfully. security is the third main risk to protect the SW portal. there are different types of roles that I have decided to implement. the reports will show in the portal without any check. Sw portal will work on the base of steemit mechanism. no need to login just for reports watching. but if you are the general users and want to report any steemit post then you will need to create an account.

For all detectives, it is mandatory to sign up your account to add your caught reports of different steemit users. General users will create their account with limited access. they cannot edit and delete reports from database. Just detective can do all the functionality like report adds, report edit, report delete and report export etc. all these above security rights will apply on the base of login and sign-up form. Two different tables will user in database for storing the general users and detective's credentials.

First of all, i will share the interface of login form. then we will discuss about its mechanism.

Screenshot_1.png

HTML, CSS and bootstrap is used to create this login interface. Account will login on the base of username and password. Logo of Steem Watcher will display on the top of login farm. Before login your account, add report's function will not show as you can see in the below screenshot.

Screenshot_5.png

but after login, add report function will enable, and you can add your reports etc. screenshot is attached below, youe can see.

For first time, you need to create your account using the Signup form. the look of Signup form is shared below. Gmail, username, password, confirm password text field is mandatory to create your account.

Screenshot_2.png

if any user loss their login credentials, then he/she can reset their password with using the mentioned below form. you can see in the below shared screen.

Screenshot_3.png

PHP Code that will verify your login credentials.

<?php
include_once('connection.php');
session_start();
if (isset($_REQUEST['password']) and $_REQUEST['password'] != '') {
    extract($_REQUEST);
    $sql = "SELECT * FROM `users` WHERE `username` = '$userName' OR `email` = '$userName'";
    $result = mysqli_query($conn, $sql);
    if (mysqli_num_rows($result) === 1) {
        $row = mysqli_fetch_assoc($result);
        if ($row['username'] == $userName && $row['password'] == $password) {
            echo "Logged in!";
            // $_SESSION['username'] = $row['userName'];
            $_SESSION['id'] = $row['id'];
            header("Location: dashboad.php");
            exit();
        } 
else
 {
echo '<div class="col-sm-3 mt-4 mb-0 mx-auto alert alert-danger alert-dismissible fade show" role="alert">Incorrect Password!.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
            // exit();
        }
} 
else 
{
echo '<div class="col-sm-3 mt-5 mb-0 mx-auto alert alert-danger alert-dismissible fade show" role="alert">Incorrect Username or Email!. 
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
 </div>';
    }
}

?> 
       

BoC- line.png

if you have any suggestion then must share with us in the comment section. we will focus on it and try to apply it if it will suitable.


Thanks for giving your precious time to my post.

Follow | Upvote | Share | Comments

Special Thanks to

Cc: @rme
Cc: @hungry-griffin
Cc: @blacks
Cc: @steemcurator01

Follow me on Instagram.
Instagram

🆃🅷🅰️🅽🅺 🆈🅾️🆄

Sort:  

Your post has been rewarded by the Seven Team.

Support partner witnesses

@seven.wit
@cotina
@bangla.witness
@xpilar.witness

We are the hope!


This post was selected for Curación Manual (Manual Curation)

@tipu curate 2

Congratulations, your post has been upvoted by @dsc-r2cornell, which is the curating account for @R2cornell's Discord Community.

Manually curated by @jasonmunapasee

r2cornell_curation_banner.png

Coin Marketplace

STEEM 0.19
TRX 0.13
JST 0.030
BTC 60910.03
ETH 3358.01
USDT 1.00
SBD 2.47