I have code here that I am currently using to display 4 images in a IFRAME on my site.
My question is what code do I need to add to get the images "when clicked on" to link back to the corresponding gallery page?
I have no problem adding the link code but when I do that it opens the link in the IFRAME window.
I basically need the code modified to open the image link in the _parent window......I think :queasy:
PHP PAGE:
<?
// Get PHPBB Config File
include("../forum/config.php");
// Connect To Database
$connectme = mysql_connect($dbhost,$dbuser,$dbpasswd);
mysql_select_db($dbname, $connectme);
// Get 4 Random Pictures From Database
$getpics=mysql_query("SELECT * FROM `".$table_prefix."gallery_pics` ORDER BY RAND() LIMIT 4");
// If the query worked.. Start The Table
if ($getpics){ print "<table width='100%'><tr>";
// PHP Loop for each pic
while($row=mysql_fetch_assoc($getpics)){
print "<td align='center'>
<img src='../forum/gallery/pic.php?mode=small&pic_id=".$row['pic_id']."' alt='" .$row
['pic_title'] ."' title='" .$row['pic_title'] ."' /><br /><div style='width:150px;'><b>" .$row['pic_title']
."</b><br />Posted By: ".$row['pic_username']."</div></td>";
}
// Finish Table
print "</tr></table>"; }
// If All Goes Wrong
else { echo "Error"; }
?>
HTML CODE:
<p style="font-family: Times New Roman,Times,serif; font-size: 16px; font-style: normal; font-weight: bolder; text-align: center;"><iframe src="/admin/gallery_block.php" scrolling="no" width="740" frameborder="0" height="200"></iframe></p>