Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once 'header.php';
- ?>
- <?php
- $id = @$_GET["id"];
- $role = $_SESSION['u_member'];
- $delete = mysqli_query($conn, "SELECT * FROM topics WHERE topic_id='".$id."'");
- $row = mysqli_fetch_assoc($delete);
- ?>
- <div class="main-wrapper">
- <br/>
- <br/>
- <h1>Submit a Request</h2>
- <hr/>
- <form method="POST" action="delete.php?id=<?php echo $id; ?>">
- <center/>Are you sure you want to delete it?<br/><input class ="slidebutton" type="submit" name="submit" value="Post">
- <br/>
- <?php
- if (isset($_POST['submit'])) {
- if($role == 'Premier'){
- mysqli_query($conn, "DELETE from topics WHERE topic_id='$id'");
- echo "<center/>POST deleted. Back to <a href='forum.php'>Forum</a>";
- }
- elseif ($role == 'Basic') {
- echo "<center/>You don't have rights. Back to <a href='forum.php'>Forum</a>";
- }
- }
- ?>
- </form>
- </div>
- <?php
- include_Once 'footer.php';
- ?>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement