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.
HTMLPHPJavaScriptCOBOL

Avatar of undefined
Last Comment
Ray Paseur
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

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.
https://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html

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?
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

It might be easier to use a text file of quotes and simply pull a random quote on each page load.
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

@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.
Avatar of tlengnick
tlengnick
Flag of United States of America image

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of tlengnick
tlengnick
Flag of United States of America image

ASKER

Ray, this is a decent workaround for now--thanks for the script!
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Thanks for the points, ~Ray
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo