Jump to content

Recommended Posts

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.