Today my group set out to enable users to register and login to our site. To do this we started with a project file that we had been using with Kyle. This project already enabled users to login to a database but that was all. As you can see in the image below people will now be able to register to the site. We have also added a logout feature once they successfully logged in.
The image below shows the php for the register form. In this block of code we had to perform certain ‘if’ statements when situations would arise. For example if a user was to use a username that was already taken then they wouldn’t be able to register and would be told why. Furthermore when users re-write their password and don’t get it correct they will notified with a message saying ‘passwords don’t match’.
In the image below you can see the index.php, this is where the forms can be edited. While building our php our forms will look very basic as it is more about getting them to work. Once The forms work then I will be able to link them to the website that I have shown in previous posts.