Forum Moderators: coopster
I tried to display a title but it kept repeating.
Any ideas?
Here's the code:
//The query:
$a = '';
$i = '';
if (isset ($_POST['application'])) {
$a = mysql_real_escape_string($_POST['application']);
}
if (isset($_POST['installation'])) {
$i = mysql_real_escape_string($_POST['installation']);
}
mysql_select_db($database_qmi, $qmi);
$query = "SELECT type, img_link_beam, img_link_tubular, img_link_symmetric, img_link_asymmetric, img_link_modular FROM searchmatrix WHERE application_type LIKE'%{$a}%' AND installation_type LIKE'%{$i}%'";
$result = mysql_query($query, $qmi) or die(mysql_error());
$row = mysql_fetch_array($result);
$totalRows = mysql_num_rows($result);
?>
//The results:
<div id="resultsContent">
//-->should start with a title BEAM and display images horizontal
<?php while ($row = mysql_fetch_array($result)) { ?>
<div id="beam"><?php echo $row['img_link_beam']; ?></div>
//-->should start with a title TUBULAR and display images horizontal
<div id="tubular"><?php echo $row['img_link_tutbular']; ?></div>
//-->should start with a title SYMMETRIC and display images horizontal
<div id="symmetric"><?php echo $row['img_link_symmetric']; ?></div>
//-->should start with a title ASYMMETRIC and display images horizontal
<div id="asymmetric"><?php echo $row['img_link_asymmetric']; ?></div>
//-->should start with a title MODULAR and display images horizontal
<div id="modular"><?php echo $row['img_link_modular'];} ?></div>
</div>
Would apreciate any help
although this is the php area, here is one short demo for what you need
in head:
<style type="text/css">
#gallery { border: solid 0px #115; margin: 1em; padding: 0.5em; }
#gallery ul { display: block; margin: 0px; padding: 0px;}
#gallery li { display: block; height:170px; list-style: none; float: left; margin: 0.25em; padding: 0px; border: solid 1px #111155; background: #F9F9FA; }
#gallery li p { text-align: center; margin: 0px; padding: 0.5em;}
#gallery hr { clear: both; visibility: hidden; margin: 0px; padding: 0px; height: 1px; }
</style>
and where you want the images:
<div id="gallery">
<ul>
<li>image here</li>
<li>image here</li>
<li>image here</li>
</ul>
<hr>
</div>