I have created this code to allow me to view items, however they are appearing on the top in a colum, can any1 help me on how 2 change the code so it will all me to c 2 tables side by side, with 2 row in each table, one with the image and i with the information from the database... please help thanks alot
<?php
include ('functions.php');
$catid = $_GET['catid'];
$query = "select catname
from categories
where catid = $catid";
$results = mysql_query($query)
or die(mysql_error());
while ($row = mysql_fetch_array($results)) {
extract ($row);
$title=$row['catname'];
echo '<h1 font color="red">'.$title. '</h1></font>';
}
echo '<br />';
$query = "select * " .
"From products where catid=$catid; " ;
$results = mysql_query($query)
or die(mysql_error());
while ($row = mysql_fetch_array($results)) {
extract ($row);
$title=$row['product_name'];
//$price=$row['product_price'];
$url= 'showproduct.php?productid='.($row['productid']);
if (@file_exists('images1/smallImages/'.$row['productid'].'.jpg'))
{
$image = '<img src=\'images1/smallImages/'.($row['productid']).'.jpg\' border=0 />';
}
else
{
echo ' ';
}
echo '<a href='.$url.'>';
//echo '<a href='.$url.'>';
echo $image;
echo ' ';
echo $title;
echo ' ';
// echo $price;
echo ' ';
/* <a href="<?php echo $url; ?>" ><?php echo $name; ?> </a><br />*/
}
?>