Using session to determine user login permissions of is super simple

  • 2020-06-12 08:38:58
  • OfStack

As shown below:

<form action="#" method=post>
 User name: <input type=text name=user><br>
 The secret    Code:  <input type=password name=pwd><br>
<input type=submit name=sbumit value= submit >
<input type=reset name=reset value= reset >
 echo "<mce:script type="text/javascript"><!--
alert(' User name cannot be empty! ');
// --></mce:script>";
 echo " Current login: System administrator <br><a href='users_manage.php'> User management </a>";
 echo" Current login: ".$_SESSION[user]."<br><a href='album.php'> My photo album </a>";

Related articles: