Forum Moderators: coopster
I need to do this use PHP, I have a MySql database table with fields: code, thumbnail, big image, description, status.
First question is How can I display thumbnails in DIVs loop in horizantal way.
2nd question is how to script the PHP page that brings a page showing the cliked item's bigger image and description.
I am new to PHP help please!
For the page with the larger pic on:
// get info from database
$out = '';
while ($row = [url=http://uk2.php.net/manual/en/function.mysql-fetch-array.php]mysql_fetch_array[/url]($result)) {
$out.= "<div class='mini_pic' id='{$row['code']}'>";
$out.= 'This is some picture...miniaturized.';
$out.= "<img src='{$row['thumbnail']}' height='200' width='200' />";
$out.= "<a href='page?big_image={$row['code']}'>";
$out.= 'Click here for a larger image</a>';
$out.= '</div>';
}
mysql_free_results($result);
echo $out;
See you how get on with the code and come back if you get any errors.