MLM(Multi Level Marketing) Website Using PHP - Binary Plan

Part 13 - Admin View Pin Request

So now we have our admin area with some secure functionality. We will move forward after part 10 where the user has successfully sent the pin request and view it. We left the further work there because we had needed an admin area that can manage all these things. 

To view the pin request will create a table similar to user panel. But in this table admin will have the option to either send the pin or cancel the request depending on the payment status or whatever admin have criteria to accept the pin request, it's all up to your requirements. So let's start.

  • Create a page view-pin-request.php. You can copy the admin's home page and rename it.
  • Now take 6 column attributes like S.n, Userid, Amount, Date, Send and Cancel.
  • Run PHP query to fetch all the request.
  • Understand the code from the video and you can copy the code, given below.


$product_amount = 300;

<!DOCTYPE html>
<html lang="en">


    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Mlml Website  - View Pin Request</title>

    <!-- Bootstrap Core CSS -->
    <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="vendor/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">




    <div id="wrapper">

        <!-- Navigation -->
        <?php include('php-includes/menu.php'); ?>

        <!-- Page Content -->
        <div id="page-wrapper">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header">Admin - View pin request</h1>
                    <!-- /.col-lg-12 -->
                <!-- /.row -->
                <div class="row">
                	<div class="col-lg-12">
                    	<div class="table-responsive">
                        	<table class="table table-striped table-bordered">
				       $query = mysqli_query($con,"select * from pin_request where status='open'");
											$id = $row['id'];
											$email = $row['email'];
											$amount = $row['amount'];
											$date = $row['date'];
                                            	<td><?php echo $i; ?></td>
                                                <td><?php echo $email; ?></td>
                                                <td><?php echo $amount; ?></td>
                                                <td><?php echo $date; ?></td>
                                        	<td colspan="6" align="center">You have no pin request.</td>
            <!-- /.container-fluid -->
        <!-- /#page-wrapper -->

    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="vendor/jquery/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="vendor/bootstrap/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="vendor/metisMenu/metisMenu.min.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="dist/js/sb-admin-2.js"></script>