I have a database that I would like to keep track of who and when people are logging on. I created a table called users. It has three fields, id, user, date. I created this script that is executed when they log in.
<?php
$db = mysql_connect("","","");
mysql_select_db("",$db);
$today= getdate();
$query = "INSERT INTO users VALUES ('','$user','$today')";
mysql_query($query);
?>
The script enters the user ok, but enters a zero value for the date and time.
If I add print_r($today); to the script, it returns the correct date and time to the browser, but not the database.
Thanks in advance for any help!
Stick