PlacementExperience
delpost.php
Go to the documentation of this file.
1 <?php
9 include 'server.php';
10 
11 session_start();
12 
13 
14 if(isset($_SESSION['loggedin']))
15 {
16  $error = array();
17 
18  $id = $_GET['id'];
19 
20  $sql = "DELETE FROM posts WHERE id = '$id'";
21 
22  if (mysqli_query($db, $sql)) {
23 
24  header("location: profile.php");
25 
26  } else {
27  echo "Error deleting record: " . mysqli_error($conn);
28  }
29 
30  mysqli_close($db);
31 
32 }
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 ?>
49