This is how I'd do it.
For this example, you would have a mysql database with the fields:
id (set to auto increment)
date_month
date_day
date_year
article
Now create a form
-- form.php --
<form method="post" action="process.php">
Article: <br>
<textarea rows="10" name="article" cols="40"></textarea>
<input type="submit" value="Post Article">
</form>
-- end of form.php --
Now insert this into database with the current date
-- process.php --
<?
// get the date and create variables for month, day, and year
$today = getdate();
$month = $today['month'];
$day = $today['mday'];
$year = $today['year'];
include("config.php");
// Connect to MySQL Server
@mysql_connect($server, $username, $password) or DIE("Couldn't Connect to MySQL Database");
// Select Database
@mysql_select_db($database) or DIE("Couldn't Select Database");
// run query to insert article into database
$query = mysql_query("INSERT INTO yourtable (date_month, date_day, date_year, article) VALUES ('$month', '$day', '$year', '$article')");
if ($query) {
echo "Article successfuly Posted";
} else {
echo "Your Article was not posted due to internal error";
?>
Now the page on your site with the news
--- news.php --
<?
include("config.php");
// Connect to MySQL Server
@mysql_connect($server, $username, $password) or DIE("Couldn't Connect to MySQL Database");
// Select Database
@mysql_select_db($database) or DIE("Couldn't Select Database");
?>
Articles for December 1, 2002<br><br>
<?
// run query to select all articles with this date
$query1 = mysql_query("SELECT * FROM yourtable WHERE date_month='December' AND date_day='1' AND date_year='2002'");
// count # of records
$num_rows = mysql_num_rows($query1);
while ($a_row = mysql_fetch_array($query1)) {
echo "<b>Article " . $a_row["id"] . "</b><br><br>";
echo $a_row["article"];
}
?>
<br><br>Articles for November 14, 2002<br><br>
<?
// run query to select all articles with this date
$query1 = mysql_query("SELECT * FROM yourtable WHERE date_month='November' AND date_day='14' AND date_year='2002'");
// count # of records
$num_rows = mysql_num_rows($query1);
while ($a_row = mysql_fetch_array($query1)) {
echo "<b>Article " . $a_row["id"] . "</b><br><br>";
echo $a_row["article"];
}
?>
There's lots of different ways of going about this, this is just the way I'd do it at first glance. Good luck!