Hi all. As a hobby I've been working on making a website with PHP and MySQL, both of which I am new to. I'm having some trouble with the comments system as I can't seem to be able to insert a date into the database. After the "insert", when I check it, no date has been entered and the date defaults to 01 Jan 1970.

$arr['postDate'] = date('j F Y', date());

	mysql_query("	INSERT INTO comments(author,subject,email,comment,article_id,postDate)
					VALUES (

The column where the date is to be inserted is of type date. I figured this was a simple problem and that I could work it out from other examples but it seems to be taking me a lot longer than expected. I'd apreciate any help you can offer.

7 Years
Discussion Span
Last Post by pritaeas
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.