Location: PHPKode > scripts > WH Board > wh_board/admin/posts_delete.php
<?php require('management/admin_functions/session.php'); ?>
<?php require('management/admin_layout/header.php'); ?>

    <ul id="breadcrumbs">
        <li><a href="index.php"><?php echo $lang['main_navigation']; ?></a></li>
        <li><a href="posts.php"><?php echo $lang['manage_posts']; ?></a></li>
        <li><a href="posts_delete.php" class="actual"><?php echo $lang['delete_posts']; ?></a></li>
    </ul>

    <div class="clear_blog"></div>

    <?php

    if((isset($_GET['post_id'])) && (is_numeric($_GET['post_id']))) {

	$id = mysql_real_escape_string($_GET['post_id']);
	$id = intval($_GET['post_id']);

		}else{

		echo '<p class="false">' . $lang['invalid_id'] . '!</p>';
		}

    $query = "DELETE FROM posts WHERE post_id = '" . $id . "'";
    $result = mysql_query($query) OR die(mysql_error());

    if($result) {

    echo '<p class="success">' . $lang['success_delete_post'] . '!</p>
    <p><a href="posts.php">' . $lang['go_on'] . '</a></p>';

    	}else{

    	echo '<p class="false">' . $lang['failed_delete_post'] . '</p>
        <p><a href="posts.php">' . $lang['back'] . '</a></p>';
    	}

    ?>

<?php require('management/admin_layout/footer.php'); ?>
Return current item: WH Board