Emplist. php
<HTML>
Empmanage. php
<HTML>
Login. php
<HTML>
Loginprocess. php
<? PHP // accept user data // 1.id$ ID =$ _ post ['id']; // 2. password $ Password = $ _ post ['Password']; // get the connection $ conn = mysql_connect ("localhost", "root", "root"); If (! $ Conn) {die ("connection failed ". mysql_errno ();} // sets the database access encoding mysql_query ("set names utf8", $ conn) or die (mysql_errno ()); // select the database mysql_select_db ("test", $ conn) or die (mysql_errno (); // send an SQL statement for verification $ SQL = "select password, name from Admin where id = $ id "; // obtain password $ res = mysql_query ($ SQL, $ conn) by ID; if ($ ROW = mysql_fetch_assoc ($ res )) {// retrieve the database password if ($ row ['Password'] = MD5 ($ password) {// Method // retrieve the username $ name = $ row ['name']; header ("Location: empmanage. php? Name = $ name "); exit () ;}} header (" Location: Login. php? Errno = 1 "); exit (); // close the resource mysql_free_result ($ res); mysql_close ($ conn);?>