google-authenticator Google Authenticator Example in PHP Now it is storing the email id in Session. You can make a connection with database to work like other websites do.