hello ,
i have intergrated a mysql table to a web page. the table contain many hundrads of products.
when the data is shown in a web page it appears line by line for each product
for example 1
product price size
A 20 2
B 15 3
C 30 4
D 35 5
E 40 6
F 45 7
G 50 8
i want to adjust this repeat region data in the format as given bellow
Example 2
Product A Product B Product C Product D
Price 20 Price15 Price30 Price35
Product E Product F Product G Product H
Price 40 Price45 Price50 Price55
presently my page shows as example1. i want to make it look like example 2.
My web page coding for example 2 is given bellow. If possible please help me edit this coding to make it look like example 2.
Code to be adjusted
<?php require_once('../Connections/utf8_general.php'); ?>
<?php
$maxRows_Recordset1 = 100;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
mysql_select_db($database_utf8_general_ci, $utf8_general_ci);
$query_Recordset1 = "SELECT * FROM PaidAds";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $utf8_general_ci) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body>
<div id="Layer1" style="position:absolute; width:625px; height:115px; z-index:1">
<table width="100%" border="1">
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['Product']; ?></td>
<td><?php echo $row_Recordset1['Price']; ?></td>
<td><?php echo $row_Recordset1['size']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</div>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>