1) I want to put 5 hyperlinks on a page and have them load in a random order everytime someone visits/refreshes 2) I also want to put 5 images on a different page and have them load randomly too (The pages are html can I add in a bit of php script into the page somehow (if so,how?) or does the whole page need to be php? any help appreciated. James.
The whole page would either need to be php or you could make a change in htaccess to allow html pages to be parsed as php pages. AddType application/x-httpd-php .html Code (markup): http://forums.digitalpoint.com/showthread.php?t=144307&highlight=php+random+banner http://forums.digitalpoint.com/showthread.php?t=79056&highlight=php+random+banner
Yeah, just make the page PHP and then use the opening - <?php - and closing - ?> - tags where you want to put the PHP code.
OK, but I am kinda after "what code should I use" Primarily I want to display 5 standard affiliate hyperlinked 120x60 images on a page column, and have them appear randomly for each different visitor. My php skills are below amateur status James.
Look up arrays and then look up the rand function on php.net. That should be a decent starting point. If you have any questions, feel free to PM me.