Perhpas you want to check your spelling too:
authors aut, news new WHERE aut.aurthor_id=new.arthor_id
They may be right in your case, but 3 different ways of spelling author?
diafol
Keep Smiling
10,672 posts since Oct 2006
Reputation Points: 1,632
Solved Threads: 1,514
Skill Endorsements: 57
The link that StephNicolaou provided should help you out. You can also look at http://www.tizag.com/phpT/phpdate.php which gives much of the same information but Tizag is a good beginners site and they tend to explain things in as simplified way as they can.
PHP has the built-in function 'date' which gets the timestamp from the server and within the parenthesis of the date function you can specify how you want the date to be displayed.
SO you could do something like:
<?php
$date_time = date("m/d/y");
?>
Then you have the date and time in the format that you want it displayed and can send the variable with your query to have it saved in the database.
Now at the time of this posting the value of $date_time would be "03/13/12" which doesn't show the name of the day of the week or the time but you can use either of the function links we've given you to format it how you want.
To test the format you can make your script print out the value of $date_time without saving it to the database so you can see how the format would actually look. And then you can change the parameters of 'date' to get it to look how you want.
weekendrockstar
Junior Poster in Training
71 posts since Dec 2010
Reputation Points: 25
Solved Threads: 16
Skill Endorsements: 0