This is my table:
CREATE TABLE IF NOT EXISTS `users` (
`id` int(6) unsigned NOT NULL AUTO_INCREMENT,
`mail` varchar(50) NOT NULL UNIQUE,
`password` varchar(30) NOT NULL,
`reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
This is my query in the php code:
$query = "INSERT INTO `users` (`email`,`psw`) VALUES ('".$email."','".$psw."')";
$_SESSION["id"] = mysqli_insert_id($db_con);
// get the date of this row and put it in $_SESSION["regdate"]