Let's suppose your date-time field is called
dateline, located in table
data_table. This is what the query should look like:
PHP Code:
$DB_site->query("INSERT INTO data_table (dateline) VALUES ('".time()."')");
That will submit the current time of whatever was processed into the database. It will be stored in the database as a timestamp, therefore you'll need to convert it to a readable format when retrieving it from the database.
Here is how to do that quickly, after you use the
SELECT query, just follow this example:
PHP Code:
$date = $query_array['dateline'];
$today = vbdate("Y-m-d",$date);
And
$today is your variable to use. Hope any of this helps