-- Select Type --
".$row['type'].""; } } ?>
--------------------------
View All
$query = mysql_query("SELECT champagne_id, type, name, price, notes, size, alcohol, offer, justarrived, thumb, image, status FROM champagnes WHERE type like '" . $type . "' ORDER BY price ASC LIMIT $from, $max_results"); if (!$query) { echo mysql_error(); } echo "
"; echo "
"; echo "
Name
Price
Tasting Notes
Size (ml)
Alcohol %
Image
Edit
Delete
Status
"; $colcount = 1; while ($row = mysql_fetch_array($query)) { $name = $row['name']; if ($colcount == "1") { $bgcol = "#DEDEDE"; $colcount = "2"; } else { $bgcol = "#EFEFEF"; $colcount = "1"; } echo "
" . $row['name'] . "
" . $row['price'] . "
" . $row['notes'] . "
" . $row['size'] . "
" . $row['alcohol'] . "
"; if ($row['status'] == "0") { $status = "disabled"; } else { $status = "enabled"; } echo "
" . $status . "
"; } echo "
"; if ($prevnext == "yes") { echo "
"; if ($page > 1) { $prev = ($page - 1); echo "
<< prev
| "; } for ($i = 1; $i <= $total_pages; $i++) { if (($page) == $i) { $posts .= "$i "; } else { echo "
$i
| "; } } // Build Next Link if ($page < $total_pages) { $next = ($page + 1); echo "
next >>
"; } echo "
"; echo ""; } ?>