A club maintains a web-site with password-controlled access. The real name, login-name and password for each member of the club is recorded in a mySQL database.
The name of the database is clubDatabase. The name of the table containing members' details is members and it contains the following fields:
name varchar(80), loginName varchar(40), password varchar(20)
The contents of this database can be accessed with the username sarsfield and password ballyneety.
Write a program called login.php. This program, which will reside on the same machine as the server for the database described above, should perform as follows.
When first called by a user's browser, the program should return a page containing a form on which the user is asked to enter her login name and password. When the user returns this form, the program should check whether there is, indeed, a member with this login name and password in the database. If the user did not enter a correct combination of login name and password, the system should output a page asking the user to try again. If the user did enter correct details, the program should output a page containing a link on which the user should click to enter the main web-site.