$query = "SELECT * FROM htp_entries WHERE id = '".$_GET['id']."'"; $result = mysql_query($query); if(mysql_num_rows($result)>0){ while($row = mysql_fetch_object($result)){ ?> ?>
$ppmcphoto = "SELECT * FROM htp_photos WHERE entry_name = '".mysql_real_escape_string($row->name)."'";
$rppmcphoto = mysql_query($ppmcphoto) or die("Error query $ppmcphoto" . mysql_error());
if(mysql_num_rows($rppmcphoto)>0){
while($photo = mysql_fetch_object($rppmcphoto)){
?>
}// end while
}// end if
?>
} }
?>