
Originally Posted by
ShadowZ
Can you please help me with and image change -that every refresh or page change the header image to change.
Thankyou
first of all you need to make a folder in your images folder, put name rotate_header, inside rotate_header put all your header images and put them fileame numbers: e.g 1.jpg, 2.jpg, 3.jpg, 4.jpg
now here script to load random image on each refresh
PHP Code:
<?
/*
1 - start counting from 1
4 - counting will end on 4, if you have more images then 4 change
*/
$random_image = rand(1, 4);
/*print random image*/
echo '<img src="images_folder/rotate_baner/'.$random_image.'.jpg">';
?>
Have fun
Bookmarks