How can I add news to website and dynamically update headlines pages without MySQL?

Hi guys,

I update a number of website for athletes with news articles…

I’m doing it manually at the moment so I have to update:

1. news.php (with date and article title which links to the article)
2. News Article (with title, date and article text)
3. includes/latestNews.php (an include latest 3-4 article dates and headline which links to the article - displays on every page via include)

The News Article is a plain and simple PHP file which is stored in a folder ‘assets/news/’ and the file is named according to date i.e. a news article today would be 130420 (as in 2013 year, 04 month, 20 day) so they sit in chronological order in the ‘news’ folder. There is a template page file called viewArticle.php which drags in the appropriate news article by link i.e. viewArticle.php?id=130420

At the moment, I have to update news.php, latestNews.php and the individual article individually and manually.

What I would like to do is…

…create, edit and add the News Article file (130420) to the ‘news’ foler as I am currently doing. But, with PHP, set news.php and latestNews.php to read the files in the ‘assets/news/’ folder to display the latest 4 article dates and linked headlines (for latestNews.php) and display all the dates and linked headlines (for news.php).

I don’t know anything about databases and can’t get my head around them so I would rather do it with PHP code. Is this possible?

Thank you very much and I hope to hear from you.




will read the directory for you.