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] != "none"
{
$split = explode("../", $row[1]);
$row[1] = $split[1];
$img = "<img src=\"$row[1]\">";
} else {
$img = "";
}
echo "$img";
if (($next==0) && ($row[2] !="none"
)
echo"<tr><td><a href=\"display.php?next=1\">next</a></td></tr></table>";
?>
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
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] != "none"
$split = explode("../", $row[1]);
$row[1] = $split[1];
$img = "<img src=\"$row[1]\">";
} else {
$img = "";
}
echo "$img";
if (($next==0) && ($row[2] !="none"
echo"<tr><td><a href=\"display.php?next=1\">next</a></td></tr></table>";
?>
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