Ok i am trying to set up a script to show images in the format
1234
5678
etc etc
the paths are all stored in a DB, i think this is more of a html style question rather than PHP? not sure...
Any input would be appriciated, if you have any better ideas how to do this let me knowPHP Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#000000">
<table width="79%" height="505" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#000000">
<tr>
<td height="501" valign="top"><table width="99%" height="179" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<?php
$title = $_GET['title'];
$host="localhost";
$user="";
$password="";
$database="";
$connection = mysql_connect($host,$user,$password);
$db = mysql_select_db($database,$connection);
$query = "SELECT * FROM tblGallery WHERE title = '$title'";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result))
{
$i = $i + 1;
echo $row['path'];
echo "<tr width='25'><img src='" . $row['path'] . "' width='140' height='140'></tr>";
if ($i = 4)
{
echo "</tr><tr>";
$i = 0;
}
}
?>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
Pino





Reply With Quote