In the previous tutorial, we discussed the code for a database connectivity in PHP using functions. That code can be seen in the folder admin with the file name “admin 2008” and in “process.php” files. In this post, you will find the UI-level coding for the system.
The first module is going to be the Login and the Signup forms. The below examples will demonstrate how to create a Form in PHP. I am attaching the code for both the forms. In the coming posts, I will attach the coding for the various departments of the college management system with UI coding. The next step will be building webpages for the various departments in the college management system.
The easiest way for building forms instead of coding is using Macromedia Dreamweaver but since we are more concerned in learning the language, we go ahead with the traditional method of hard coding the forms.
The functions in both the forms need to be connected to a database, and if the username and the password is correct, the page will be re-directed to a home page. If not, an error message will be displayed.
The signup form is for adding a new user to the management system. The database connection coding is the one which I have mentioned in the first post.
In that post, I have defined a function called Function “userpasschk()” which is used for verifying the username and password. “Function new register ()” is used for submitting new data of the user to the database. The complete code can be seen in the zip file I have attached.
I have also attached the codes for the previous and the current tutorial. We have a total of 4 files. I am attaching the complete code in the Word doc below.