I realize this probably pretty basic but nonetheless I need a point in the right direction ..
heres what I got:
I currently have it to where the user can input data and it is stored in a mysql db.. I am having problems with the output portion and it being formatted the way I would like it.
I want for it to print the all the data results inside of html tables...
5 across (columns) and 2 down (rows) so a total of ten records are printed out. After 10 I want it to generate a second page with the next 10 records.. these records will all be sorted by date..
here is a screen shot.. http://fluxar.com/images/star.jpg
here is the code I currently have to print my results..
<?php include ('connect/index.php') ?>
<?php
mysql_connect(localhost, $username, $password);
@mysql_select_db($database) or die("Unable to select database");
$query = "SELECT * FROM saleitems";
$result = mysql_query($query);
$num = mysql_numrows($result);
mysql_close();
echo "<center>Database Output</center><br><br>";
?>
<table border="1" cellspacing="2" cellpadding="2" align="center">
<tr>
<?php
$i=0;
while ($i < $num){
$image = mysql_result($result, $i, "image");
$name = mysql_result($result, $i, "name");
$classification = mysql_result($result, $i, "classification");
$percentoff = mysql_result($result, $i, "percentoff");
$dateadded = mysql_result($result, $i, "dateadded");
?>
<td><?php echo "<img src=\"$image\"><br>$name<br>$classification<br>$percentoff<br>"; ?></td>
<?php
$i++;
}
echo "</tr></table>";
?>
any help on this would be greatly appreciated! thanks