Forums

This topic is locked

automatically entering the date of entry in mysql.

Posted 25 May 2003 02:15:18
1
has voted
25 May 2003 02:15:18 jonas flint posted:
> I have a small web app that I'm working on which consists of displaying
entries of information through a textarea box, as well as the date it was
posted. (using the CURDATE function) My database is a simple 1 table 3
column database: ID, entry_text & entry_date. I want to be able to display
the information using the dynamic table feature but I want the date to be
displayed on with the day of the post. Displaying the textarea (entry_text)
information is no problem but when it displays the date I get 00-00-0000.
How do get the posted date to display?

I wan't the current date to be entered into the database when the user makes his post. for example if you post it on 5-24-2003 I want that date to automatically be entered into the database and displayed on the page for the date of that post. (for example: posted by jive on 5-24-2003)

the sql query would be:


if ($submitentry == "SUBMIT" {
$sql = "INSERT INTO database SET
entry_text='$text',
entry_date=CURDATE()";

I know what the query is, I just don't know how to implement it in dwmx.

Reply to this topic