Is there a way I can have php grab the date and save it along with the article and include it in the displayed articles after submission is complete?
Date Stamp
Moderator: General Moderators
Date Stamp
I have a PHP CMS that I made for the submission of news articles to a mysql database. What I would like to do is include the date the article was created. I was trying to use DATE_STAMP in my sql but it was retunring 0000-00-00 on every entry.
Is there a way I can have php grab the date and save it along with the article and include it in the displayed articles after submission is complete?
Is there a way I can have php grab the date and save it along with the article and include it in the displayed articles after submission is complete?
Re: Date Stamp
You can use the timestamp function in mysql and then retrieve it to be displayed. Otherwise date() is your friend.
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Date Stamp
You can use DATE as the data type in the DB and date("Y-m-d") in PHP.
Re: Date Stamp
Ahh, job done, cheers fella's
