<?php




?>

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel='stylesheet prefetch' href='https://use.fontawesome.com/releases/v5.0.10/css/all.css'>
    <link rel="stylesheet" type="text/css" media="screen" href="main.css" />

</head>

<body>

    <div class="logo">
        <img src="logo-banner.png" alt="" srcset="">
    </div>

    <div class="tabs">
       <div class="tabs-content" style="width: 100%">
         <form action="UserModifyAction.php" method="POST">

            <?php

include 'DBConnection.php';

$id = $_GET['emp_id'];

$sql       = "select * from user_access where `emp_id` = $id limit 1";

$results   = mysqli_query($connection, $sql);
$row = mysqli_fetch_assoc($results);

echo '<table border="1">';
echo '<thead>';

echo '<th>'.'Employee ID'.'</th>';
echo '<th>'.'Curent User Role'.'</th>';
echo '<th>'.'Mew Role'.'</th>';
echo '<th>'.'Action'.'</th>';



echo '</thead>';

    echo '<tr>';
 
     echo '<td><input style="width: 50px ;" type="text" name = "id" value="'.($row['emp_id']).'" ></td>';
      echo '<td><input style="width: 50px ;" type="text" value="'.($row['user_role']).'" readonly></td>';
 echo '<td><select style="width: 100px ;" name="role"><option value="user">User</option><option value="admin">Admin</option></select></td>';
    echo '<td><select style="width: 100px ;" name="option"><option value="approve">Approve</option><option value="reject">Reject</option></select></td>';
    echo '<td><input type="submit" name="submit" value="submit">';
    echo '</tr>';

echo '</table>';

?>
        </form>

       </div> 

    </div>


    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script src="main.js"></script>
</body>

</html>

