i'm looking 4 delete function and i found this one... this code not work 4 me...
<?php include 'core/init.php'; include 'includes/overall/header.php'; if (isset($_POST['action']) && $_POST['action'] === 'delete'){ $errors = array(); if (empty($errors)){ delete_post($_GET['post_id']); } } $page = (isset($_GET['page'])) ? (int)$_GET['page'] : 1; ?> <div class="table"> <div class="tr-style"> <div class="style1"> Title </div> <div class="style2"> Content </div> <div class="style3"> Categories </div> <div class="style3"> User </div> <div class="style4"> Date Published </div> <div class="style4"> Action </div> </div> <?php foreach (get_all_post($page, 5) as $post) { ?> <div class="clear"></div> <form action="" method="post"> <div class="tr-style2"> <div class="style1a"> <?php echo $post['title']; ?> </div> <div class="style2a"> <?php echo $post['body']; ?> </div> <div class="style3a"> <?php echo $post['cat']; ?> </div> <div class="style3a"> <?php echo $post['user']; ?> </div> <div class="style4a"> <?php echo $post['date']; ?> </div> <div class="style4a"> <a href="edit.php">Edit</a> </div> <div class="style4a"> <a href="?action=delete" title="delete post">Delete</a> </div> </div> </form> <?php } ?> ?>