I have the following script and need to pass the variable $fupload to the new page that is opened display.php
How can I achieve this?
gallery.php
<?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('display.php', '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"); ?>
display.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>paintings art george lewis sale buy artists london</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div align="center">
<?php
print "<img src=\"/images/archive/$fupload\">"
?>
</div>
</body>
</html>