php_novice2007 Posted October 22, 2007 Share Posted October 22, 2007 Hi all, I've made the following login system so far: a loginForm.html that accepts the user name and password. a loginck.php that verifies the user name and password. If successful, redirect to the menu page, if not, redirect back to loginForm.html. My question is.. if login was unsuccessful, how can I reload loginForm.html but with an error message as well? Currently the page just reloads and some users think that the login system is not working not realising that they have typed the wrong information. In an earlier version I had a message and a link back to loginForm.html displayed on loginck.php if login was unsucessful but it was annoying to have to click on the link all the time and thats why I made it redirect.. Any help is much appriciated. Thanks~! Quote Link to comment https://forums.phpfreaks.com/topic/74365-login-system/ Share on other sites More sharing options...
otuatail Posted October 22, 2007 Share Posted October 22, 2007 Best way is to scrap the html idea. rename to php. Login check sets a session variable to something like $_SESSION['Error'] = 'This field is required' The login page can display this meesage. If there is no meesage to display, then nothing will appear. Desmond. Quote Link to comment https://forums.phpfreaks.com/topic/74365-login-system/#findComment-375712 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.