Hi,
Sorry im new to .php, but is it possible to load say a background image to a table id?
PHP Code:
<table width="750" height="600" <?php include "images.php"; ?>>
I need to load this into my main table as a background:
PHP Code:
<?php
$dir=opendir("images/bg/color/");
//This is the directory route to the folder
$directory="/images/bg/color/";
//This is a relative link to the directory if it is not in the same directory as the file you are displaying the images on
$pattern="\.(gif|jpg|jpeg|png|bmp|swf)$";
if(!$dir)
{
die("Failed to read directory");
}
$s=readdir($dir);
$count="0";
$image;
while($s)
{
if(ereg($pattern, $s))
{
$image[$count]=$s;
$count++;
}
$s=readdir($dir);
}
closedir($dir);
//Spit it out
$limit=count($image);
$limit--;
$randNum=rand(0,$limit);
echo "<br><img src=\"$directory$image[$randNum]\" $size[3]>";
?>
I have come up with this
Test Page but i need it to be embedded into the table. Ive put <?php include "images.php"; ?> between the <td> </td>tags
Think I have confused my self again!
Thanks in advance,
Gareth