I am trying to insert the datetime into a column in a mysql table.
<?php
//Some code
date_default_timezone_set('Europe/London');
//Other variables defined also
$date_time = new DateTime();
$queryreg = mysql_query ("
INSERT INTO users VALUES ('','$username','$password','$email','$website','$image','$date_time')
");
?>
However the browser states: "Catchable fatal error: Object of class DateTime could not be converted to string in C:\xampp\htdocs\design\register.php on line 181". Any idea why it is doing this? Many thanks in advance.