this is my image gallery code and i need help making pages for the pics... can someone help
if ($action == "getinfo") {
$Query = mysql_query("SELECT * FROM $tablename WHERE id='$id'");
$Row = mysql_fetch_assoc($Query);
$thefile = "images/$Row[filename]";
$imageInfo = getimagesize($thefile);
$width = $imageInfo[0];
$height = $imageInfo[1];
print "
<table>
<tr>
<td>
<b>Name:</b>
</td>
<td width=\"300\">
$Row[filename]
</td>
</tr>
<tr>
<td>
<b>Description:</b>
</td>
<td width=\"300\">
$Row[description]
</td>
</tr>
<tr>
<td>
<b>Dimensions:</b>
</td>
<td>
$width x $height
</td>
</tr>
</table>";
} elseif ($action == "viewgallery") {
print "<table border=\"1\" cellpadding=\"5\"><tr>";
while ($Row=mysql_fetch_array($theid)) {
$den = $den+1;
print "
<script language=\"javascript\">
function details$den()
{
Details =window.open(\"index.php?action=getinfo&id=$Row[id]\", 'details','height=200,width=400,fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
}
</script>
";
$thefile = "images/$Row[filename]";
$imageInfo = getimagesize($thefile);
$width = $imageInfo[0];
$height = $imageInfo[1];
if ($picsonrow == "4") {
print "</tr><tr>";
$picsonrow = "0";
} else {
}
if (100 > $width && 100 > $height) {
print "
<td align=\"center\" height=\"100\" width=\"100\">
<a href=\"index.php?action=view&id=$Row[id]\">
<img src=\"images/$Row[filename]\" border=\"0\" alt=\"$Row[description]\">
</a>
</td>
";
$picsonrow = $picsonrow+1;
} else {
print "
<td align=\"center\" height=\"100\" width=\"100\">
<a href=\"index.php?action=view&id=$Row[id]\">
<img src=\"images/$Row[filename]\" border=\"0\" width=\"100\" height=\"100\" alt=\"$Row[description]\">
</a>
</td>
";
$picsonrow = $picsonrow+1;
}
}
} elseif ($action == "view") {
$Query = mysql_query("SELECT * FROM $tablename WHERE id='$id'");
$Row = mysql_fetch_assoc($Query);
print "
<center>
<hr>
<a href=\"index.php?action=viewgallery\">Main Gallery</a>
<hr>
<br>
<table border=\"1\">
<tr>
<td>
<img src=\"images/$Row[filename]\">
</td>
</tr>
</table>
<br>
";
$thefile = "images/$Row[filename]";
$imageInfo = getimagesize($thefile);
$width = $imageInfo[0];
$height = $imageInfo[1];
print "
<table border=\"1\">
<tr>
<td>
<table>
<tr>
<td>
<b><font face=\"verdana\" size=\"2\">Name:</b>
</td>
<td>
<font face=\"verdana\" size=\"2\">$Row[filename]
</td>
</tr>
<tr>
<td>
<b><font face=\"verdana\" size=\"2\">Description:</b>
</td>
<td>
<font face=\"verdana\" size=\"2\">$Row[description]
</td>
</tr>
<tr>
<td>
<b><font face=\"verdana\" size=\"2\">Dimensions:</b>
</td>
<td>
<font face=\"verdana\" size=\"2\">$width x $height
</td>
</tr>
</table>
</td>
</tr>
</table>";
}