<html>
<head><title>Week #4 ~ Lestat </title>
<link rel="stylesheet" type="text/css" href="/css/scriptskewl.css">
</head>
<body>

<?
/* BASIC Assignment #4: 
   Write a script to rotate banners kept inside an array 
   stored using a separate file and using require to bring 
   into the main script which does the rotation.  */

// Set path to images
$image_path 'gifs';

// Set banner array
$banner_array = array('1.gif','2.gif','3.gif','4.gif','5.gif','6.gif','7.gif');

// Set random Seed
mt_srand(time());

// Set static min & random max values, by counting the
// imags in the array, to randomly display
$random_banner =(mt_rand(1, (count($banner_array)))-1);

// Print the random banner
print("<img src=\"$image_path/$banner_array[$random_banner]\" height=100 width=100>");

?>





<pre>
</pre>
<br>
<iframe src='wk4basicsrc.php' width='850' height='300'></iframe>
<br>
<a href='../index.html'>BACK</a>
</body>
</html>