Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display images .....pls. help

Status
Not open for further replies.

hisham

IS-IT--Management
Nov 6, 2000
194
I have a photo table contains:
id
photo1
photo2
photo3
photo4
photo5
and the following code"display.php":

$query = mysql_query("SELECT * FROM photo WHERE id='$id'");
$row = mysql_fetch_row($query);
$next=0;
?>
<table>
<tr><td>
<?

if ($row[1] != &quot;none&quot;) {
$split = explode(&quot;../&quot;, $row[1]);
$row[1] = $split[1];
$img = &quot;<img src=\&quot;$row[1]\&quot;>&quot;;
} else {
$img = &quot;&quot;;
}

echo &quot;$img&quot;;
if (($next==0) && ($row[2] !=&quot;none&quot;))
echo&quot;<tr><td><a href=\&quot;display.php?next=1\&quot;>next</a></td></tr></table>&quot;;

?>

this code will show the image from the first row, I want to complete the code, then when I click on NEXT, this will display just one image, the next image from row[2] only, with the word NEXT etc… and the final image will be from row[5]
any help please?
thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top