/    Sign up×
Community /Pin to ProfileBookmark

Changing content when the page reloads

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

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@NinjaPenguinApr 25.2007 — 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?
Copy linkTweet thisAlerts:
@rbudjApr 26.2007 — 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.
Copy linkTweet thisAlerts:
@Still_Learning2authorApr 26.2007 — 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.
Copy linkTweet thisAlerts:
@NinjaPenguinApr 26.2007 — 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.
Copy linkTweet thisAlerts:
@mahfoozApr 27.2007 — you can use the sql query and use [code=php]order by rand()[/code]
this will get the result from table rendomly
×

Success!

Help @Still_Learning2 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...