


Code: Select all
<?php
$query = mysql_query("SELECT * FROM the-table-name-here ORDER BY id DESC LIMIT 10");
while($row = mysql_fetch_assoc($query)) {
//Here you put in the code to show the title, picture and so. And then also insert this:
?><a href="product.php?id=<?php echo $row['id']; ?>">//Whatever the links title needs to be.</a>
}
?>
Code: Select all
<?php
$id = $_GET["id"];
$query = mysql_query("SELECT * FROM the-table-name-here WHERE id='$id' ORDER BY id DESC LIMIT 1");
$row = mysql_fetch_assoc($query);
//Now we got information enough to make the other parts as picture, text and more. Just do something like this:
?>
<h2><?php echo $row['title-row-name-here']; ?></h2><br>
<p><?php echo $row['text-row-name-here']; ?></p>
//And so on ;)