delete.php 375 B

1234567891011121314
  1. <?php
  2. $http_host = $_SERVER['HTTP_HOST'];
  3. include("../../functions.php");
  4. $con = startdb('rw');
  5. if (!checkSession($con)){
  6. header("Location: /index.php");
  7. exit (-1);
  8. }
  9. else{
  10. $id = mysqli_real_escape_string($con, $_GET['p']);
  11. mysqli_query($con, "UPDATE post SET visible = 0 WHERE id = $id;");
  12. version();
  13. }
  14. ?>