mardi 24 février 2015

is it safe to use rand for generating confirmation code ? php

when the user want to reset his password , I send to his email a 6 digits code, then I check if the user enter the matched code !


I am generating the code using rand function :



$code = rand ( 100000, 999999 );


is it safe to do that ?





Aucun commentaire:

Enregistrer un commentaire