View Single Post
Old 09-09-2008, 10:13   #2
AbyssUnderground
Inactive
 
Join Date: Oct 2005
Location: Merseyside
Age: 37
Services: BT Infinity Option 2, HH5, synced at maximum 80Mbps/20Mbps.
Posts: 2,221
AbyssUnderground has reached the bronze age
AbyssUnderground has reached the bronze ageAbyssUnderground has reached the bronze ageAbyssUnderground has reached the bronze ageAbyssUnderground has reached the bronze ageAbyssUnderground has reached the bronze ageAbyssUnderground has reached the bronze ageAbyssUnderground has reached the bronze ageAbyssUnderground has reached the bronze ageAbyssUnderground has reached the bronze age
Send a message via MSN to AbyssUnderground
Re: random content on page load

You could have a separate page for each and then some basic php pr javascript to go to one of the random pages. PHP would be better since it works on all computers, but with javascript it would have to be enabled. Here is the PHP I would use.

random.php
PHP Code:
<?php

// 1,4 indicates a number between 1 and 4 will generate on load, edit as necessary with the number of pages
$rand rand(1,4);

// this redirects your browser to the appropriate page based on the random number (in theory!)
header("Location: testimonial".$rand.".htm");

// name pages as "testimonial1.htm" and "testimonial2.htm" etc, with a progressing number
// as you make new pages. Remember to edit the random number to the number of pages
// you have made testimonials for

?>
The script is untested but should work.
AbyssUnderground is offline   Reply With Quote