Problem:
Trying to pass several variables ($fupload, $status, $name, $materials, $size)to the next page (display.php).
Using the script below I can pass $fupload fine. How do I pass the other variables too? I already tried separating them with question marks (?).
Script in gallery.php
<?php
$db = "gallery";
$link = mysql_connect( "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?fupload=$fupload?name=$name')\"><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 );
?>
Script in display.php
<?php
include("header.inc");
?>
<p> </p>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10%"> </td>
<td width="80%" align=center><?php print "<img src=\"/images/archive/$fupload\"> "; ?></td>
<td width="10%"> </td>
</tr>
<tr>
<td width="10%"> </td>
<td width="80%"><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="50%">Name:</td>
<td width="50%"><?php print " $name "; ?></td>
</tr>
<tr>
<td width="50%">Materials:</td>
<td width="50%"><?php print " $materials "; ?></td>
</tr>
<tr>
<td width="50%">Size:</td>
<td width="50%"><?php print " $size "; ?></td>
</tr>
<tr>
<td width="50%">Status:</td>
<td width="50%"><?php print " $status "; ?></td>
</tr>
</table></td>
<td width="10%"> </td>
</tr>
</table>
<p> </p>
<?php
include("footer.inc");
?>