"; echo "Photo Gallery / "; echo ""; echo $row["name"] . " / "; } $myquery = "select * from sub_photo where id = $sub_id "; $result = mysql_query($myquery,$link); if($row = mysql_fetch_array($result)){ echo $row["name"] ; } $myquery= "select * from photo where id=$id "; $result = mysql_query($myquery,$link) ; while($row = mysql_fetch_array($result)){ $id = $row["id"]; $photo = $row["photo"]; } if($nextphoto == 'true'){ $myquery = "select * from photo where sub_id=$sub_id order by id limit $id,1 "; $result = mysql_query($myquery,$link) ; while($row = mysql_fetch_array($result)){ $id = $row["id"]; $photo = $row["photo"]; } } if($prevphoto == 'true'){ $myquery = "select * from photo where sub_id=$sub_id order by id limit $id,1 "; $result = mysql_query($myquery,$link) ; while($row = mysql_fetch_array($result)){ $id = $row["id"]; $photo = $row["photo"]; } } ?>

Previous

Next