I am showing an image on my page from the db table like this:
<?php
if ($db_found) {
$SQL = "SELECT * FROM myTable where id='$posted_id'";
$result = mysql_query($SQL);
while ($db_field = mysql_fetch_assoc($result)) {
echo '<img src="images/'.$db_field['image'].'" alt="" />';
}
mysql_close($db_handle);
}
?>
<a href="#">Next</a>
How can I do so that if $posted_id is for example 1 ... when I click the "Next" link the image id = 2 appears and so on.