Creating my own blog?
I am writing a blog for a website using a MSQL database. I know how to enter the text into the database and then show this on the website, but how can i get it to automatically enter the date the message was written, enter that into the database and then output that to the website.
I know how to show the current date, but that is pointless as i want my website to look like normal blogs, where it has the blogs post date recorded.
I could simply have another input field in which i can manually enter the date into the database but this is a little silly when the process can be automated.
I know i could use something like Blogger as a blogging tool, but i want to write my own so i have full controll over it, and so it can be intergrated into another website.
Thanks for any suggestions
Lucy
Marshton: do you mean the type of field is of date type or the field is to be called date? or both?!
Tagged with: blog • blogger • blogs • current date • input field • lucy • msql database • website thanks
Filed under: Automated Blog
Like this post? Subscribe to my RSS feed and get loads more!

















create a new field in the database that is ‘date’
then when you are going to submit the content to the database, add this
$content = content
$date = date(‘c’);
$insertdate = mysql_query(‘INSERT INTO content (content,date) VALUES (‘.$content.’,’.$date.’);
and the date would be in the database, to get it back just do the same as you do for content just with the date instead!
Good luck!