<div id="main_content">
<?php
//error_reporting(0);
include("includes/connect.php");
$select_posts = " select * from posts ";
$run = mysql_query($select_posts);
while($row = mysql_fetch_array($run_posts)) {
$post_id = $row['post_id'];
$post_title = $row['post_title'];
$post_date = $row['post_date'];
$post_author = $row['post_author'];
$post_image = $row['post_image'];
$post_keywords = $row['post_keywords'];
$post_content = $row['post_content'];
?>
<h2> <?php echo $post_title; ?> </h2>
<?php } ?>
</div>
While creating CMS I am displaying the content on main page but getting usual error and warning
Notice: Undefined variable: run_posts in C:\wamp\www\CMS\includes\main_content.php on line 10
Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in C:\wamp\www\CMS\includes\main_content.php on line 10