Avatar of tlengnick
tlengnickFlag for United States of America asked on

Automate text on website

At the bottom of my site http://www.r12financial.com/tlengnick/test02.php 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.

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon
Ray Paseur

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

It might be easier to use a text file of quotes and simply pull a random quote on each page load.
Ray Paseur

@padas: That makes sense to me, but the author wants to change the text every 24 hours.  I think Forbes.com 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.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck

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 Paseur

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Ray, this is a decent workaround for now--thanks for the script!
Ray Paseur

Thanks for the points, ~Ray
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.