I'm setting up a newsroom, and I've found some nice scripts to help me set up the admin page which sends the info to a database.
if ($submit == "SUBMIT") {
$sql = "INSERT INTO news SET
header='$header',
content='$content',
date=CURDATE()";
if (@($sql)) {
echo("<p>Your news has been added.</p>");
} else {
echo("<p>Error adding submitted news: " .
mysql_error() .
"</p>");
}
}
The problem is that the date only displays the year, but i'd like to display day and month as well. How can I send the date variable containing day, month and year to the database?
Hope this made sence and that someone can help a novice.
Cheers!