Jump to content

Last Visited code problem


shreyaskudav

Recommended Posts

<?phpsession_start();include 'details.php';$lastvisited = date("Y-m-d");$sql = "UPDATE users SET lastvisited = $lastvisited WHERE id = '.$id.' ";mysql_query($sql);session_destroy();?>

The above code is of logout.php! When user logs out.. an entry is made of the time to the database.

 

Datatype of the column is date.

But its not working?? Its stored this value in the database: 0000-00-00

What should I do?

Edited by shreyaskudav
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...