Jump to content

Login security code re-direct an error.


jpopuk

Recommended Posts

Hi,

 

When a user logs in if they type in their login details incorrect it shows them an error then redirects back to the login screen.

 

When they put the incorrect Security code in it shows the error but doesn't redirect back.

 

How would I implement a redirect back in php?

 

This is the code I am assuming I would need to add the redirect.

 

if (strtoupper($_POST['code']) != $_SESSION['code']) {         error('Invalid security code entered!');     } else {         unset($_SESSION['code']);     } 

 

 

When logged in successfully it has this bit of code that redirects which I tried but it didn't work:

 

output('You have successfully logged in! Please wait while we redirect you to your my account section.');         redirect('/myaccount/', 2); 

 

 

If anyone has any suggestions that would be great. Many thanks,

 

Paul

Link to comment
https://forums.phpfreaks.com/topic/169991-login-security-code-re-direct-an-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.