Automate text on website

At the bottom of my site there is a box that I want to update every day with different quotations.

Currently, the text is "Try not to become a person of success, but rather try to become a person of value" (so you know which box I'm referring to).

I want it to automatically pull from a list of quotations and change that text every 24 hours.

What is the easiest method for doing this?

Thank you.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
Do you have any experience in PHP?  IF not, please consider hiring a professional or using these learning resources to get the foundation you might need.

The answer to this question is a small application that keeps track of the current date and time, and uses this datetime information to choose among a list of quotations.  It's not hard, but it has a lot of moving parts that are elemental in PHP and MySQL.

Once you have created a data base of quotations, you would need to write some code to choose among the rows that would be returned from the results set in response to a query.  Do you have any test data or any code written yet?
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
It might be easier to use a text file of quotes and simply pull a random quote on each page load.
Ray PaseurCommented:
@padas: That makes sense to me, but the author wants to change the text every 24 hours.  I think does something like this.  So it might be better to exert a little more control over the choice of the quote.  We will learn more about the scope of the task when we find out if there is any PHP experience.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

tlengnickAuthor Commented:
Thank you for the replies.

I have a decent history of programming (extensive Visual Basic and some CSS, Action Script, Perl, and in the old days, Fortran and COBOL). I used PHP for the first time to get my form working on my site, but haven't done much more with PHP.

As I am looking for a simple solution, pulling a quote at each page load would work.

How should I proceed?
Ray PaseurCommented:
Actually, you could just "hard code" the quotes into something like this.  It would get you started until you wanted to spend the time to learn some more PHP.

<?php // RAY_temp_tlegnick.php

// SEE

$now = date('D');

$quotes = array
( 'Mon' => "It's all in the wrist."
, 'Tue' => "It ain't over till <i>I say</i> it's over."
, 'Wed' => "Hump Day!"
, 'Thu' => "Go long.  I'll fake it to you."
, 'Fri' => "Working for the weekend."
, 'Sat' => "Brevity is the soul of wit."
, 'Sun' => "Quoth the Raven, Nevermore."

echo $quotes[$now];

Open in new window

And if you want to learn some more about PHP, and avoid the pitfalls of random internet searches, this article will help point you to good resources.

HTH, ~Ray

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tlengnickAuthor Commented:
Ray, this is a decent workaround for now--thanks for the script!
Ray PaseurCommented:
Thanks for the points, ~Ray
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.