samoht Posted September 18, 2007 Share Posted September 18, 2007 hello all, I have a db driven page that list all the products if no ProductId isset - and only one product if isset. When all the products are listed the page runs over the footer unless I throw some html element below the repeating div portion. Right now I am doing this: <div id="expandtable"> <h1>Plastics Molding Equipment</h1> <h3>Injection Molding, Transfer, Shuttle & Compression Presses</h3> <?php // list all the products... if (!isset($_GET['ProductId'])) { while ($row = mysql_fetch_assoc($result)) { extract($row); echo "\t".'<div class="pm"><p><a href="plastics.php?ProductId='.$ProductId.'" class="linkcolor">' .$Name.'</a><br>'."\n\t"; echo '<img src="images/'.$ImagetnURL.'" />'.$ShortDescr.'</p></div>'."\n\t"; } } else { $ProductId = $_GET['ProductId']; $q = "SELECT Name, PDF, ImagefsURL, Descr FROM products WHERE products.ProductId = '$ProductId' "; $result = mysql_query($q, $connection1) or die(mysql_error()); $row = mysql_fetch_assoc($result); extract($row); echo '<br>'; echo '<span class="mb">'.$Name.'</span>'; if ($PDF != '') { echo '<p><img src="images/'.$ImagefsURL.'" style="float:right;" border="0" />'.$Descr.'<span class="pdf"> <a href="pdfs/'.$PDF.'" class="linkcolor" target="_blank">View PDF</a></span></p>'; } else{ echo '<p><img src="images/'.$ImagefsURL.'" style="float:right;" border="0" />'.$Descr; } }?> <h1>*</h1> </div> The <h1>*</h1> is a bad solution - any ideas on something better? Link to comment https://forums.phpfreaks.com/topic/69738-expanding-page-problem/ Share on other sites More sharing options...
AV1611 Posted September 18, 2007 Share Posted September 18, 2007 the second clause case opens a <p> but doesn't close it... just a though... Link to comment https://forums.phpfreaks.com/topic/69738-expanding-page-problem/#findComment-350408 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.