Note that there are some explanatory texts on larger screens.

plurals
  1. POHTML not showing up in view page source
    primarykey
    data
    text
    <p><strong>Summary:</strong> designing a file management system for school, currently working on the page that will display a list of downloads in an HTML table</p> <p><strong>Problem:</strong> 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.</p> <p>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?</p> <p>**Update: I commented out the php at the top of my <code>download_list.php</code> file and my HTML displayed. So something is clearly wrong with my php.</p> <p><strong>The code:</strong></p> <p><strong>download_list.php :</strong> <pre><code> ini_set( 'display_errors', TRUE ); error_reporting( E_ALL); require_once('database.php'); // Get all categories $query = 'SELECT * FROM file ORDER BY fileID'; $files = $db-&gt;query($query); ?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;!-- the head section --&gt; &lt;head&gt; &lt;title&gt;My Downloads&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="main.css" /&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="container"&gt; &lt;h1&gt;Category List&lt;/h1&gt; &lt;table&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;&amp;nbsp;&lt;/th&gt; &lt;/tr&gt; &lt;?php foreach ($files as $file) : ?&gt; &lt;tr&gt; &lt;td&gt;&lt;?php echo $file['filename']; ?&gt;&lt;/td&gt; &lt;td&gt; &lt;form action="download_file.php" method="post" id="download_file_form"&gt; &lt;input type="hidden" name="category_id" value="&lt;?php echo $file['filename']; ?&gt;"/&gt; &lt;input type="submit" value="Download"/&gt; &lt;/form&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php endforeach; ?&gt; &lt;/table&gt; &lt;br /&gt; &lt;h2&gt;Add Category&lt;/h2&gt; &lt;form action="add_category.php" method="post" id="add_category_form"&gt; &lt;label&gt;Name:&lt;/label&gt; &lt;input type="input" name="name" /&gt; &lt;input id="add_category_button" type="submit" value="Add"/&gt; &lt;/form&gt; &lt;br /&gt; &lt;p&gt;&lt;a href="index.php"&gt;List Products&lt;/a&gt;&lt;/p&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p><strong>database.php :</strong></p> <pre><code>&lt;?php mysql_connect("filler.hostica.com", "filler", "filler") or die(mysql_error()); mysql_select_db("filler") or die(mysql_error()); exit(); ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload