Click to See Complete Forum and Search --> : Changing content when the page reloads


Still Learning
04-25-2007, 05:04 PM
Good afternoon,

I have a website with a "feature article" on it and tend to leave it waaaaay too long between updates. I would love to be able to have a method of rotating through a number of preset articles every time a visitor returns to the site...or reloads the page.

I understand that php will be the way to go, but I need a push in the right direction.

If someone could point me to a tutorial (or just a piece of code) I can take a look at...I'm willing to learn how to do it, but just don't know where to start.

Thank you for any help you can provide...and if I can give any further info to help, just let me know.

Still learning

NinjaPenguin
04-25-2007, 05:56 PM
When you say 'rotating through preset articles', do you mean you would like to have them selected at random, or cycled through in strict sequence?

rbudj
04-26-2007, 11:53 AM
go to http://www.hotscripts.com and search the PHP scripts for banner rotation. Then, instead of using banners, just use your articles.... just a quick idea that I have done before myself.

Still Learning
04-26-2007, 01:26 PM
Thank you for the quick response,

Ninja - I would like to have them randomly pop up a new article when the page reloads...well, it doesn't really matter if it is random or in a preset sequence. To be honest, whatever is easier to code ;)

Rbudj - Thank you for the tip, I'll check it out.

Thanks again

S.

NinjaPenguin
04-26-2007, 02:45 PM
Either way, it's basically matter of randomising from the number of articles there are and then just pulling up an article based on the result.

mahfooz
04-27-2007, 05:55 AM
you can use the sql query and use order by rand()
this will get the result from table rendomly