Small problem - hope you can help...
Please see the gallery section at
www.octavianart.com/galleries.php and choose a gallery to view. Then click on one of the paintings to view it in a new window.
I want to be able to format this window as a standard for all the windows, but for different paintings. All info stored in a MySql database.
Can this be done with PHP? I have used javascript to open the window - but I can't format it!
Any ideas?
this is the code so far:
<?php include("header.inc"); ?>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="5">
<tr>
<td width="5%" valign="top" class="link"> </td>
<td width="20%" valign="top" class="link"><div align="left"><a href="galleries.php"><<
BACK to Galleries</a></div></td>
<td width="10%" valign="top" class="link">Gallery</td>
<td width="55%" align="center" valign="top" class="link"><p class="text">
<?php
$db = "gallery";
$link = mysql_connect( "host", "user", "pass" );
if ( !$link ) die( "Couldn't connect to MySQL".mysql_error() );
mysql_select_db( $db, $link ) or die( "Couldn't open $db: ".mysql_error() );
$sql = "SELECT * FROM galleryTable WHERE tour = '$page' ORDER BY id DESC";
$result = mysql_query( $sql, $link );
while ( $newArray = mysql_fetch_array($result) )
{
$id = $newArray['id'];
$status = $newArray['status'];
$name = $newArray['name'];
$materials = $newArray['materials'];
$size = $newArray['size'];
$fupload = $newArray['fupload'];
$tupload = $newArray['tupload'];
print "
<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td valign=top width=\"40%\">
<a href=\"#\" onClick=\"window.open('/images/archive/$fupload', 'newWindow', 'status=no,toolbar=no,menubar=no,location=no')\"><img src=\"/images/archive/$tupload\"></a>
</td>
<td valign=bottom width=\"60%\"><p class=smalltext>$name<br>$materials<br>$size<br>$status</p></td>
</tr>
</table><hr noshade color=#000000>
";
}
mysql_close( $link );
?>
<br>
</p></td>
<td width="10%" align="center" valign="top" class="link"> </td>
</tr>
</table>
<?php include("footer.inc"); ?>