Hi All,
Hoping someone can help me out with this, I have a products database and the data pulled and displayed on a paginated page..However currently the data is just listed in 3 columns "Product_Image" "Model_No" & "Product PDF", But i want to change it so it is more like a catalogue and has 3 -4 products in row rather than listing them in all in one column. The code to display the data and link to example page is below:
upun.co.uk/UKJST.phpPHP Code:echo "<tr><th>Product Image</th><th>Model No</th><th>Product PDF</th></tr>";
// loop through results of database query, displaying them in the table
for ($i = $start; $i < $end; $i++)
{
// make sure that PHP doesn't try to show results that don't exist
if ($i == $total_results) { break; }
// echo out the contents of each row into a table
echo "<tr>";
echo '<td><img src="' . mysql_result($result, $i, 'product_image') . '"/></td>';
echo '<td>' . mysql_result($result, $i, 'model_no') . '</td>';
echo "<td><a href='" . mysql_result($result, $i,'product_pdf') . "'>Product PDF Download</a></td>";
echo "</tr>";
}
// close table>
echo "</table>";
// pagination
hope this makes sense, and appreciate any input on the matter!
Thanks,
Steve
Submit Your Article
Forum Rules

Reply With Quote