I have generated a new token :
$token = uniqid();
$url = "http://koto/resetPassword?token=$token";
I received an email in my mailbox :
$message = "Hello, here is your new password : $url";
And when I click on the link I am redirected to the right page but even if I change the token in the url bar it is still working, the page is still visible.
This is how I display my page :
case "resetPassword":
I think I have to check that my generated token corresponds to the token in the database and if it is the case I can display the page. But when I do $_GET[‘token’] it is always empty.
I don’t know why but since I am using $url = "http://koto/resetPassword?token=$token";
in the redirected page from my mailbox I can not take the token with $_GET[‘token’] in this specific page.
rayane bouwdene is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.