tags:

views:

19

answers:

1

I have a php file in the admin section of a website I built. The file pulls posts from a certain database and corresponding table spits them out onto the page with a Edit button link to edit that specific post. All of this is working properly. However at the moment the database says there are 15 entrys in the table, yet only 12 are viewable on screen to click and edit. Please let me know what else I can include to help me solve my problem? Thanks in advanced.

Blog.php file

<?php
    include("../mysqlConnect.php");
    include("header.php");

    $results = mysql_query("SELECT *  FROM blog ");
?>
<?php include("adminNav.php");?>


     <div id="logout">
        <a href="http://mrskitson.ca"&gt;view changes</a>
     </div>



     <div class="span-16" id="learning">

     <?php
        while($row = mysql_fetch_array($results)){
        $title = $row['title'];
        $date = $row['date'];
        $image = $row['image'];
        $content = stripslashes($row['content']);
        $id = $row['id'];


        echo "<div class='span-16' id='posts'>";
        echo "<h1>$title </h1>";
        echo "<h2>$date</h2>";
        echo "<img src='../images/blog/$image'>";
        echo "<p>$content</p>";
        echo "<a class='editPost' href=blogEdit.php?id=$id>Edit This Post</a>";
        echo "</div>";
        }
     ?>
     </div>


<?php
 include("footer.php");
?>
A: 

The code seems to run to all the records store in the table "blog". I can think of three things you are pulling data from the wrong table, looking at the wrong table on phpMyAdmin or in your CSS the id "learning" has defined a height and overflow and is hiding the other records.

redhatlab