Jump to content

Update Once In A Week


laado

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...