CREATE TABLE `imgrotate` ( `img` varchar(50) default NULL, `desc` varchar(200) default NULL ) TYPE=MyISAM;
INSERT INTO `imgrotate` (`img`,`desc`) VALUES ("name.jpg","description");
<?php
$result = mysql_query ("SELECT * FROM imgrotate ORDER BY RAND() LIMIT 1");
while ($row = mysql_fetch_array($result))
{
$img = $row["img"];
$desc = $row["desc"];
}
?>
<img src="path/to/images/<?=$img?>" alt="<?=$desc?>" />
May be of some use...
Christiaan
On 22/07/2004, at 4:05 PM, Jackie Reid wrote:
Hi
we use rotator php scripts and all we do is something like this.....
<img src="images/headers/rotate.php" height="96" width="750" alt="some alt
tag or another" />
You only end up with a single alt tag for all images though so that might be
a problem for you, but the site validates just fine
Jackie
*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*****************************************************
