Welcome! Log In Create A New Profile

Advanced

Walkthrough One - PHP User Authentication

Posted by 77928490 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Walkthrough One - PHP User Authentication
March 12, 2013 07:46AM
Hi, this was a great section. Gone through it a few times now to try get to grips with it. Almost there.

It strikes me how thorough you need to be in order to code a 'simple' user authentication page.

I changed a few things. For one I did not like the page1.php file name reference. It made more sense for me to call it signin.php. So when you 'login' the resultant php file would either be 'signin.php' or 'signup.php'.
Re: Walkthrough One - PHP User Authentication
March 20, 2013 10:59AM
I never knew that so much goes into a login page,i thot it was just an if-else statement, got to learn on sessions which is still tricky, but will go over and over this topic till i am good to go

..&ru..
avatar Re: Walkthrough One - PHP User Authentication
March 21, 2013 01:18AM
Really like this walkthrough, good to see how everything we've learnt in the previous chapters are coming together and how we can use it in the real world.
avatar Re: Walkthrough One - PHP User Authentication
March 21, 2013 02:41AM
Hi there all,
I just noticed in this login walkthrough that I was able to register a user name that does not adhere to the limitations in the code >=10 and <=20. Is my conclusion correct that this happens because the same errorMessage variable is used for the user name and password, so if the password is the correct length the errorMessage is set to blank, even though the user name is still too short/long? Would I also be correct to think the solution to this shortcoming would be to use a different errorMessage for the user name and password? Or would a better solution be to change the if-statement to combine the checking of the user name and password?
Cheers!
avatar
Mac
Re: Walkthrough One - PHP User Authentication
March 22, 2013 08:49AM
I have not tried its myself, but your logic appears to be 100%. Since a user must enter both, start of with user name and nest password within the user name brackets.
Sorry, only registered users may post in this forum.

Click here to login