HTML not showing up in view page source

Summary: designing a file management system for school, currently working on the page that will display a list of downloads in an HTML table

Problem: Nothing is showing up on the browser when pull up the page that I put onto my website. When I check view page source nothing is listed. Somehow none of my HTML is getting recognized and I’m not sure why.

When I moved my HTML opening tag above the php statement it was the only thing that showed up on the view page source..what am I doing wrong here?

**Update: I commented out the php at the top of my download_list.php file and my HTML displayed. So something is clearly wrong with my php.

The code:

download_list.php :

    ini_set( 'display_errors', TRUE );
    error_reporting( E_ALL);


    // Get all categories
    $query = 'SELECT * FROM file
              ORDER BY fileID';
    $files = $db->query($query);


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="">

<!-- the head section -->
    <title>My Downloads</title>
    <link rel="stylesheet" type="text/css" href="main.css" /> 


    <div id="container">

            <h1>Category List</h1>
            <?php foreach ($files as $file) : ?>
                <td><?php echo $file['filename']; ?></td>
                    <form action="download_file.php" method="post"
                        <input type="hidden" name="category_id"
                               value="<?php echo $file['filename']; ?>"/>
                        <input type="submit" value="Download"/>
            <?php endforeach; ?>
    <br />

    <h2>Add Category</h2>
    <form action="add_category.php" method="post"

        <input type="input" name="name" />
        <input id="add_category_button" type="submit" value="Add"/>
    <br />
    <p><a href="index.php">List Products</a></p>



database.php :


    mysql_connect("", "filler", "filler") or die(mysql_error());
    mysql_select_db("filler") or die(mysql_error());



Leave a Reply


Hire Me
Follow Me!
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.