In the previous post regarding Authorization, I wrote about the portion that deals with returning users.
To reference that post visit:
http://dinocajic.blogspot.com/2015/07/php-user-authorization-returning-users.html
This one completes it.
To reference that post visit:
http://dinocajic.blogspot.com/2015/07/php-user-authorization-returning-users.html
This one completes it.
- Start with main()
- It double checks to make sure that the username $_SESSION is not set. If so, it redirects the user to the main page. By redirecting, the script that was written in the previous post is called to log the user in..
- It checks for form submission.
- If not, call form() method
- Checks form fields and sanitizes the content
- If there were errors, display form() method with errors
- If everything is good, log the user in through the logUserIn() method
- If not successful, display error message and call the form() method
- If it made it to this point, the cookie and session are set
- User is redirected to the main page
I am impressed in the design of your website. Excellent designing, Thank you so much.
ReplyDeletewebsite design training
website design courses