Jump to content

Update Once In A Week


laado
 Share

Recommended Posts

I m creating a site in which i have a weekly magazine. the condition is that the magazine update once in a week. can any one help me in this problem.i have no idea about this. because i m beginner in php. please help me urgent

Link to comment
Share on other sites

I don't understand - doesn't a human have to update it? You can't get a computer to write the articles for you :).If you want to run a certain action at a certain time, regularly or otherwise, have a look at Cron Jobs (Linux) or Scheduled Tasks (Windows).

Link to comment
Share on other sites

no no.suppose there are some articales in my database. and once in a week it will add in my site.

I don't understand - doesn't a human have to update it? You can't get a computer to write the articles for you :).If you want to run a certain action at a certain time, regularly or otherwise, have a look at Cron Jobs (Linux) or Scheduled Tasks (Windows).
Link to comment
Share on other sites

Oh right - you can do that with a Cron Job. Just get it to run a PHP script once a week that updates the database.

<?php	//connect to database	$id = implode(mysql_fetch_assoc(mysql_query("SELECT id FROM articles WHERE published = 0 ORDER BY id LIMIT 1")));	mysql_query("UPDATE articles SET published = 1 WHERE id = $id");?>

Link to comment
Share on other sites

Or use a Content Management system that allows you to 'date' your article submissions.sNews CMS will do that. Write the article and give it a Publish date in the future. On that date, the article becomes available for the site viewers.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...