Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo "<center><h1>Mitglieder</h1>";
- $check = mysqli_query($db,"SELECT * FROM users");
- $rows = mysqli_num_rows($check);
- while($row = mysqli_fetch_assoc($check)){
- $id = $row['id'];
- echo "<a href='Profil.php?id=$id'>".$row['username']."</a><br>";
- ?>
- <form action="Mitglieder2.php" method="POST">
- <input type="submit" name="submit" value="Account löschen" style="width:110px;"><br><br>
- </form>
- <?php
- if(isset($_POST['submit'])){
- if($query = mysqli_query($db,"DELETE * FROM users WHERE id == '$id ") ){
- echo "You deleted the account successfully.";
- }else{
- echo "There was a problem. Please try later again.<br><br>";
- }
- }
- }
- echo "</center>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement