title: Parse error: syntax error, unexpected $end in file on line 128
body: <p>Hi So this is the code: 
  Its a page to display my available tables in the database in a drop-down, then display the results in the table. The actual code to do so (in the middle) works perfectly on its own, but when I try to add my template around it I get errors...</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta name="keywords" content="" &gt;
  &lt;meta name="description" content="" &gt;
  &lt;meta http-equiv="content-type" content="text/html; charset=utf-8" &gt;
  &lt;title&gt;SNYSB Archive&lt;/title&gt;
  &lt;link href="style.css" rel="stylesheet" type="text/css" media="screen" &gt;
  &lt;!-- Location of javascript. --&gt;
  &lt;script language="javascript" type="text/javascript" src="swfobject.js" &gt;&lt;/script&gt;
  &lt;/head&gt;
      &lt;div id="wrapper"&gt;
      &lt;div id="header"&gt;
      &lt;!-- KEEP THIS BIT [ITS FORMATTING] --&gt; 
      &lt;/div&gt;
      &lt;!-- end #header --&gt;
      &lt;div id="menu"&gt;
              &lt;ul&gt;
              &lt;li&gt;&lt;a href="Hpage.php"&gt;Home&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="Register.php"&gt;Register&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
      &lt;!-- end #menu --&gt;
      &lt;div id="page"&gt;
      &lt;div id="page-bgtop"&gt;
      &lt;div id="page-bgbtm"&gt;
      &lt;div id="content"&gt;
              &lt;div class="post"&gt;
              &lt;div class="post-bgtop"&gt;
              &lt;div class="post-bgbtm"&gt;
  &lt;h1 class="title"&gt;PUT HEADING HERE!&lt;/h1&gt;
                  &lt;div class="entry"&gt;
                      &lt;p class="Body"&gt;
  &lt;?php
  $dbname = 'snysbarchive';
  $conn= mysql_connect('localhost', 'root', 'usbw');
  if (!$conn) {
      echo 'Could not connect to mysql';
      exit;
  }
  
  $sql = "SHOW TABLES FROM $dbname";
  $result = mysql_query($sql);
  
  if (!$result) {
      echo "DB Error, could not list tables\n";
      echo 'MySQL Error: ' . mysql_error();
      exit;
  }
  if (mysql_select_db($dbname, $conn))
  {
  ?&gt;
      &lt;form method="post" action="new 2.php"&gt;
      &lt;select name="tables"&gt;
      &lt;?php
      while ($row = mysql_fetch_row($result)) {
      ?&gt;    
      &lt;?php
          echo '&lt;option value="'.$row[0].'"&gt;'.$row[0].'&lt;/option&gt;';
      }
      ?&gt;
      &lt;/select&gt;
      &lt;input type="submit" value="Show"&gt;
  &lt;/form&gt;
  &lt;?php
  //mysql_free_result($result);
  if (isset($_POST) &amp;&amp; isset($_POST['tables']))
  {
      $tbl=$_POST['tables'];
      //echo $_POST['tables']."&lt;br /&gt;";
      $query="SELECT * from $tbl";
      $res=mysql_query($query);
      echo $query;
      if ($res)
      {
      ?&gt;
      &lt;table border="1"&gt;
      &lt;?php
          while ( $row = mysql_fetch_array($res))
          {
              echo "&lt;tr&gt;";
              echo "&lt;td&gt;".$row[0]."&lt;/td&gt;";
              echo "&lt;td&gt;".$row[1]."&lt;/td&gt;";
              echo "&lt;td&gt;".$row[2]."&lt;/td&gt;";
              echo "&lt;td&gt;".$row[3]."&lt;/td&gt;";        
              echo "&lt;/tr&gt;";
          } ?&gt;
      &lt;/table&gt;
      &lt;?php
      }
  }
  ?&gt;
  &lt;/div&gt;
  &lt;/div&gt;
              &lt;/div&gt;
              &lt;/div&gt;
  
          &lt;div style="clear: both;"&gt;&amp;nbsp;&lt;/div&gt;
          &lt;/div&gt;
          &lt;!-- end #content --&gt;
          &lt;div id="sidebar"&gt;
              &lt;ul&gt;
                  &lt;li&gt;
                      &lt;h2&gt;Welcome!&lt;/h2&gt;
                      &lt;p&gt;Welcome to SNYSBs archive!
                         &lt;/p&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                      &lt;h2&gt;SNYSB&lt;/h2&gt;
                      &lt;p&gt;
              &lt;a href="Contact.php"&gt;Contact Us!&lt;/a&gt;
                      &lt;/p&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
          &lt;!-- end #sidebar --&gt;
          &lt;div style="clear: both;"&gt;&amp;nbsp;&lt;/div&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;!-- end #page --&gt;
      &lt;div id="footer"&gt;
          &lt;p&gt;Copyright (c) 2008 Sitename.com. All rights reserved. Design by &lt;a href="http://www.freecsstemplates.org/"&gt;Free CSS Templates&lt;/a&gt;.&lt;/p&gt;
      &lt;/div&gt;
      &lt;!-- end #footer --&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It keeps saying unexpected end but I am not sure how to fix it?</p>
  
  <pre><code>Error Message:Parse error: syntax error, unexpected $end in file on line 128
  </code></pre>
  
  <p>Thanks</p>