The below script is used to extract info from a database and create links to documents
include('rail_connect.php');
for ($i=0;$i<=5😉
{
$o=$i*5;
$sql="SELECT id,date_format(posted,'%W %D %b %Y'),link_name from notices order by id desc limit $o,5";
$result=mysql_query($sql);
print"<tr>";
while (list ($id,$posted,$link_name) = mysql_fetch_row ($result))
{
print (" <td><a href=\"../railfiles/$link_name\">HERE</a></td>\n");
}
print"</tr>";
$i=$i+1;
}
If you change the HERE for an <img> tag and place the image name within the database, it would work.
This code is set to display 30 links so you will need to tinker with the for loop a little.
Hope this helps
Neil