Location: PHPKode > scripts > WH Board > wh_board/admin/blog_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="blog.php">Blog</a></li>
        <li><a href="blog_posts_delete.php" class="actual"><?php echo $lang['delete_articles']; ?></a></li>
    </ul>

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

    <?php

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

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

		}else{

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

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

    $sql = "DELETE FROM comments WHERE com_id2 = '" . $id . "'";
    $result2 = mysql_query($sql) OR die(mysql_error());

    if($result && $result2) {

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

        }else{

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

    ?>

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