Jump to content

Recommended Posts

Hello,

Is there a way to display daily news automatically on my website using php/SQL, if not how can I do it?

 

for example: everyday, a new event paragraph will replace the other one based on the date, and all the future events will be followed day after day.

 

Thanks..

Link to comment
https://forums.phpfreaks.com/topic/171988-daily-events-updated-automatically/
Share on other sites

thanks guys for your help!

I read the tutorials about the cron job and I am able to figure it using the cPanel, but the problem is:

all the daily news that I have, where should I put them?

and how they will be displayed based on their order?

 

thanks...

all the daily news that I have, where should I put them?

 

What do you mean?  Maybe a database?

 

and how they will be displayed based on their order?

 

However you want.

 

Sorry for such vague answers, but I think you need to be a little more specific and provide more information.

 

I have around 300 quotes, and I need each day 1 quote to be displayed automatically.

 

I am facing the problem about how can I do it using php or MySql.

 

Do you have these quotes on file? May it only show one same quote during the whole day or show random quotes on each refresh?

 

Random quotes:

 

$lines = file('path/to/quotes/file');
print $lines[array_rand($lines)];

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.