PDO Messed Up My CSS / HTML Layout

caffe911

New Member
One of my webpages that had perfect format under MySQL_* functions, suddenly got mixed up when I translated the old functions to PDO. The problem is that my Copyright bar is now floating above my table of MySQL data, while it should be at the bottom of the page. I'm not sure why it's happening. Any help is appreciated!This is the portion of the file that I believe may be the problem:\[code\]<div id="content" style="float:center;background-image:url('http://tinyurl.com/bds4u2j');"><ul class="menu"><li><?phpif(!isset($_COOKIE['username'])){echo "Welcome, guest!";}else{echo "Welcome, " . $_COOKIE['username'];}?></li><li><br></li><li><a class="item" href="http://stackoverflow.com/questions/14534094/index.html">Home</a></li><li><a class="item" href="http://stackoverflow.com/questions/14534094/classes.html">Classes</a></li><li><a class="item" href="http://stackoverflow.com/questions/14534094/contact.html">Contact</a></li><?phpif(!isset($_COOKIE['username'])){echo '<li><a class="item" href="http://stackoverflow.com/questions/14534094/login.html">Login</a></li>';}else{echo '<li><a class="item" href="http://stackoverflow.com/questions/14534094/upload.html">Upload</a></li>';echo '<li><a class="item" href="http://stackoverflow.com/questions/14534094/password_protect.php?logout=1">Logout</a></li>';}?></ul><center><h1>Mr. Stanford's first period</h1></center><br> <center><h3>Your class files are available for download below</h3></center> <br> <br> <center> <?php echo "<table border='1'><tr><th>Filename</th><th>Description</th><th>Download</th>";IF(isset($_COOKIE["username"])){echo "<th>Delete</th>","</tr>";}ELSE{echo "</tr>";}try{ $dbh = new PDO('mysql:host=$host;port=$port;dbname=$dbname','$username','$password'); foreach($dbh->query('SELECT * from period1') as $row) {echo "<tr>"; echo "<td>" . $row['Filename'] . "</td>"; echo "<td>" . $row['Description'] . "</td>"; echo "<td><a href = "http://stackoverflow.com/questions/14534094/. $row['File'] ." ><button>Download</button></a></td>"; IF(isset($_COOKIE["username"])) { echo "<td><a href = 'http://stackoverflow.com/questions/14534094/deletefile.php?$s_id=". $row['s_id'] ."'><button>Delete</button></a></td>","</tr>"; } ELSE { echo "</tr>"; } echo "</table>"; } $dbh=null;} catch (PDOException $e) { print "<br>ERROR: " . $e->getMessage() . "<br/>"; die(); }$dbh=null;?> </center> <br> <br> <br></div><div id="footer" style="background-color:#99FF33;clear:both;text-align:center;">Copyright ? David Schilpp 2013, All Rights Reserved</div>\[/code\]Again, thank you to anybody who can help me debug this problem!
 
Back
Top