is there any way to get up a php statement to show different HTML code on page reload and refresh PHP or JS would be fine Thanks
Yep You can do anything with PHP. You'd probably need to have the different content/html stored in a database though. Then you could just have the content pulled out of the database at random whenever the page is refreshed. Like for example you've probably seen Wordpress widgets/plugins where it shows on the right side of the site "Random Posts". The script is just randomly pulling posts to be displayed in that widget. My guess would be to look into using the "rand" function in php. Edit: I may have misunderstood the question too. Sounds like you want maybe want the page to always show specific content when you first go to it, but change if you refresh the page in any way. If so, you could maybe also have it setup so a session is created whenever accessing that page, and in the script have it setup so if the session exists(if it's already been accessed before), then it will different content or whatever you want.
samie, there's no need in storing html files in a database. You can create html file which contains the content to be shown, then you can load specific content on the html file with specific id or class. You can do this in jquery, here's a link: http://api.jquery.com/load/
You can use the following code to display content of a page randomly. This code can be used to display a portion/part of a webpage randomly. <?php $content_path = "content/"; $content_array = array( 1 => "test1.html", 2 => "test2.html", 3 => "test3.html", 4 => "test4.html" ); $num = rand (1, 4); require_once($content_path.$content_array[$num]); ?> So in the code above, let's say I have 4 webpages that I want to display each time a page is loaded (test1.html, test2.html, test3.html, test4.html). These webpages are located under folder "content" which is defined in $content_path variable. You can change this variable to anything to fit your needs. The next variable is content_array which is used to defined where your webpages/contents are. The rand function is a built-in php function which is used to generate a random number within the range you specified. In this case, I use rand(1,4) meaning that I want a random number within the range 1-4 everytime a page is load. Notice the range 1-4 corresponds to the number of pages that are defined in $content_array. So, if you have 5 webpages instead of 4, then the rand function should be changed to rand(1,5) Hope this helps! Little John
heres something I found, try this. <?php $rotate[] = "<a href='LOCATION_URL'><img src='IMAGE_URL' alt='ALTERNATIVE_TEXT' /></a>"; $rotate[] = "<a href='LOCATION_URL'><img src='IMAGE_URL' alt='ALTERNATIVE_TEXT' /></a>"; $rotate[] = "<a href='LOCATION_URL'><img src='IMAGE_URL' alt='ALTERNATIVE_TEXT' /></a>"; $rotate[] = "<a href='LOCATION_URL'><img src='IMAGE_URL' alt='ALTERNATIVE_TEXT' /></a>"; $number = rand(0, sizeof($rotate) - 1); echo $rotate[$number]; ?> Code (markup):