I am trying to make an automating news script. I want it to display when the script was submitted. Also, the order in which the news is displayed is relying on the timestamp. The timestamp is only showing 0000-00-00.
heres url to site[url]http://www.uogameresources.com/sik
This code is in the news page.
[code]
$query = mysql_query(“select id,name,title,text,DATE_FORMAT(postdate, ‘%Y-%m-%d’) as date from news order by postdate DESC limit 6”);
while($news = mysql_fetch_array($query)) {
echo “<div class=’n_title’>Title: “. $news[‘title’]. “<br>”;
echo “Posted by: “.$news[‘name’].” on “.$news[‘date’].”</div>”;
echo $news[‘text’]. “<br><br>”;
This code is in the form page.
[code]
mysql_query(“insert into news (name,title,postdate,text) values (‘$name2′,’$title’,’postdate’,’$text’)”);