Created
August 31, 2018 20:48
-
-
Save IhwanID/5baedd2e4f7de975210634501170be7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//session_start(); | |
//if(! isset($_SESSION['loggedin'])) | |
//exit('akses dilarang, silahkan login dulu'); | |
include_once('config.php'); | |
$id = $_GET['id']; | |
$query = mysqli_query($mysqli, 'DELETE FROM posts WHERE id ='. $id); | |
if($query){ | |
header('Location: index.php'); | |
}else{ | |
exit('Deleting Failed : '. mysqli_error($mysqli)); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment