Page 2 of 2

Posted: Sun Nov 16, 2003 8:16 pm
by Paddy
Ah, ok. :) Alrighty then. You can use getdate

http://au2.php.net/manual/en/function.getdate.php

This splits the current timestamp up into an array. You can then just grab the pieces you want and then turn them into a string that MySQL will qualify as a date. Let me know if you need more of a help.

Posted: Mon Nov 17, 2003 2:39 am
by twigletmac
If you are just looking for the current date you can simply use MySQL's NOW() function:

Code: Select all

$query = "INSERT INTO message_table (title, designation, message, date_created) VALUES ('$title', '$designation', '$message', NOW())";
Mac