Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, bool given in C:\xampp\htdocs\construct\admin\admin_edit.php on line 28 ?>
<div class="container-fluid"> <!-- DataTales Example --> <div class="card shadow mb-4"> <div class="card-header py-3"> <h6 class="m-0 font-weight-bold text-primary"> EDIT Admin Profile </h6> </div> <div class="card-body"> <?php if(isset($_POST['edit_btn'])) { $id = $_POST['edit_id']; $query = "SELECT * FROM register WHERE id = '$id' "; $query_run = mysqli_query($conn, $query); while ($row = mysqli_fetch_assoc($query_run)) { ?> <form action="code.php" method="POST"> <input type="hidden" name="edit_id" value="<?php echo $row['id'] ?>"> <div class="form-group"> <label> Username </label> <input type="text" name="edit_username" value="<?php echo $row['name'] ?>" class="form-control" placeholder="Enter Username"> </div> <div class="form-group"> <label>Email</label> <input type="email" name="edit_email" value="<?php echo $row['emaill'] ?>" class="form-control" placeholder="Enter Email"> </div> <div class="form-group"> <label>Password</label> <input type="password" name="edit_password" value="<?php echo $row['password'] ?>" class="form-control" placeholder="Enter Password"> </div> <a href="register.php" class="btn btn-danger"> CANCEL </a> <button type="submit" name="updatebtn" class="btn btn-primary"> Update </button> </form> <?php } } ?> ?> </div> </div> </div>
$query_run = mysqli_query($conn, $query);
mysqli_query()
false
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)