php会员登录模块是网站开发中很简单的一个模块,本实例主要给php初学者一个简单的参考,其中的逻辑还是要读者自己领会,多编多思考。

login.php文件

<"display_errors", 1);
"en"> 
 <head>
  <title>Tutorialspoint.com</title>
  <link href="css/bootstrap.min.css" rel="stylesheet">  
  <style>
   body {
   padding-top: 40px;
   padding-bottom: 40px;
   background-color: #ADABAB;
   }   
   .form-signin {
   max-width: 330px;
   padding: 15px;
   margin: 0 auto;
   color: #017572;
   }   
   .form-signin .form-signin-heading,
   .form-signin .checkbox {
   margin-bottom: 10px;
   }   
   .form-signin .checkbox {
   font-weight: normal;
   }   
   .form-signin .form-control {
   position: relative;
   height: auto;
   -webkit-box-sizing: border-box;
   -moz-box-sizing: border-box;
   box-sizing: border-box;
   padding: 10px;
   font-size: 16px;
   }   
   .form-signin .form-control:focus {
   z-index: 2;
   }   
   .form-signin input[type="email"] {
   margin-bottom: -1px;
   border-bottom-right-radius: 0;
   border-bottom-left-radius: 0;
   border-color:#017572;
   }   
   .form-signin input[type="password"] {
   margin-bottom: 10px;
   border-top-left-radius: 0;
   border-top-right-radius: 0;
   border-color:#017572;
   }   
   h2{
   text-align: center;
   color: #017572;
   }
  </style>  
 </head> 
 <body>  
  <h2>Enter Username and Password</h2> 
  <div class="container form-signin">   
   <"container">  
   <form class="form-signin" role="form" action="<" method="post">
   <h4 class="form-signin-heading"><"text" class="form-control" name="username" placeholder="username = tutorialspoint" required autofocus></br>
   <input type="password" class="form-control" name="password" placeholder="password = 1234" required>
   <button class="btn btn-lg btn-primary btn-block" type="submit" name="login">Login</button>
   </form>   
   Click here to clean <a href="logout.php" tite="Logout">Session.  
  </div>  
 </body>
</html>

Logout.php文件

<"username"]);
 unset($_SESSION["password"]); 
 echo 'You have cleaned session';
 header('Refresh: 2; URL=login.php');
"text-align: center">php <div id=

php会员登录模块是网站开发中很简单的一个模块,本实例主要给php初学者一个简单的参考,其中的逻辑还是要读者自己领会,多编多思考。

login.php文件

<"display_errors", 1);
"en"> 
 <head>
  <title>Tutorialspoint.com</title>
  <link href="css/bootstrap.min.css" rel="stylesheet">  
  <style>
   body {
   padding-top: 40px;
   padding-bottom: 40px;
   background-color: #ADABAB;
   }   
   .form-signin {
   max-width: 330px;
   padding: 15px;
   margin: 0 auto;
   color: #017572;
   }   
   .form-signin .form-signin-heading,
   .form-signin .checkbox {
   margin-bottom: 10px;
   }   
   .form-signin .checkbox {
   font-weight: normal;
   }   
   .form-signin .form-control {
   position: relative;
   height: auto;
   -webkit-box-sizing: border-box;
   -moz-box-sizing: border-box;
   box-sizing: border-box;
   padding: 10px;
   font-size: 16px;
   }   
   .form-signin .form-control:focus {
   z-index: 2;
   }   
   .form-signin input[type="email"] {
   margin-bottom: -1px;
   border-bottom-right-radius: 0;
   border-bottom-left-radius: 0;
   border-color:#017572;
   }   
   .form-signin input[type="password"] {
   margin-bottom: 10px;
   border-top-left-radius: 0;
   border-top-right-radius: 0;
   border-color:#017572;
   }   
   h2{
   text-align: center;
   color: #017572;
   }
  </style>  
 </head> 
 <body>  
  <h2>Enter Username and Password</h2> 
  <div class="container form-signin">   
   <"container">  
   <form class="form-signin" role="form" action="<" method="post">
   <h4 class="form-signin-heading"><"text" class="form-control" name="username" placeholder="username = tutorialspoint" required autofocus></br>
   <input type="password" class="form-control" name="password" placeholder="password = 1234" required>
   <button class="btn btn-lg btn-primary btn-block" type="submit" name="login">Login</button>
   </form>   
   Click here to clean <a href="logout.php" tite="Logout">Session.  
  </div>  
 </body>
</html>

Logout.php文件

<"username"]);
 unset($_SESSION["password"]); 
 echo 'You have cleaned session';
 header('Refresh: 2; URL=login.php');
"text-align: center">

以上就是本文的全部内容,希望对大家的学习有所帮助。

SESSION会员登录实例分享" onmousewheel="return bbimg(this)" onload="javascript:resizepic(this)" border="0"/>

以上就是本文的全部内容,希望对大家的学习有所帮助。

华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com