Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $id = $_POST["id"];
- if(!is_string($id) && !empty($id)) {
- $delete = mysqli_query($connect,"DELETE from users WHERE ID=$id");
- $_SESSION["succMsg"] = "User have been successfully removed";
- Header("Location:login_update.php");
- } else {
- $_SESSION["succMsg"] = "Unable to execute the query.";
- Header("Location:login_update.php");
- }
- $id = (int) $_POST["id"];
- if (isset($_POST["id"])) {
- $id = (int) $_POST["id"];
- // Do your query....
- }
- function addOptions()
- {
- global $connect;
- $result = mysqli_query($connect,"SELECT * FROM users ORDER BY ID ASC");
- while ($row = mysqli_fetch_assoc($result)) {
- $id = $row["id"];
- echo "<option value='$id'>$id</option>";
- }
- }
- function addOptions()
- {
- global $connect;
- $result = mysqli_query($connect,"SELECT * FROM users ORDER BY ID ASC");
- while ($row = mysqli_fetch_assoc($result)) {
- $id = $row["id"];
- echo "<option value="".$id."">$id</option>";
- }
- }
Add Comment
Please, Sign In to add comment