I made this script to generate a string and insert it into a database, but it doesn't insert into the database even though i get no errors what so ever.
$pare = $id;
$time_stamp = date('H:m');
$token = 'token'. md5($pare . $time_stamp);
echo " Token: -" . $token;
try {
$database = $this->server->connect_to_database('3250900');
$sql_query_string = "INSERT INTO `authentication_tokens` (`id`, `user_id`, `token`, `timestamp`) VALUES (:n, :user_id, :token, :time_stamp)";
$statement = $database->prepare($sql_query_string); //Prepare the sql statement
$statement->execute([ ':n' => NULL,
':user_id' => $pare,
':token' => $token,
':time_stamp' => $time_stamp]); //execute query
} catch (Exception $e) {
echo $e;
}
print_r($statement);