php bootstrap实现简单登录

yipeiwu_com5年前PHP代码库

本文实例为大家分享了php bootstrap实现简单登录的方法,供大家参考,具体内容如下

这里写图片描述

这里写图片描述

这里写图片描述

所有文件

这里写图片描述

记住是获取name键值对 from 里面 action就是你的动作

signin.html

<!DOCTYPE html>
<html lang="en">
 <head>
 <meta charset="utf-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
 <meta name="description" content="">
 <meta name="author" content="">
 <link rel="icon" href="../../favicon.ico">

 <title>Signin Template for Bootstrap</title>

 <!-- Bootstrap core CSS -->
 <link href="bootstrap.min.css" rel="stylesheet">

 <!-- Custom styles for this template -->
 <link href="signin.css" rel="stylesheet">

 <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
 <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
 <script src="../../assets/js/ie-emulation-modes-warning.js"></script>

 <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
 <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
 <![endif]-->
 </head>

 <body>

 <div class="container">

  <form class="form-signin" method = "get" action = "form-signin.php">
  <h2 class="form-signin-heading">Please sign in</h2>
  <label for="inputEmail" class="sr-only">Email address</label>
  <input type="email" id="inputEmail" name ="inputEmail"class="form-control" placeholder="Email address" required autofocus>
  <label for="inputPassword" class="sr-only">Password</label>
  <input type="password" id="inputPassword"name ="inputPassword" class="form-control" placeholder="Password" required>
  <div class="checkbox">
   <label>
   <input type="checkbox" value="remember-me" name="remember me"> Remember me
   </label>
  </div>
  <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
  </form>

 </div> <!-- /container -->


 <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
 <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
 </body>
</html>

sign.css

body {
 padding-top: 40px;
 padding-bottom: 40px;
 background-color: #eee;
}

.form-signin {
 max-width: 330px;
 padding: 15px;
 margin: 0 auto;
}
.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;
}
.form-signin input[type="password"] {
 margin-bottom: 10px;
 border-top-left-radius: 0;
 border-top-right-radius: 0;
}

form-signin.php

<pre>
<?php print_r($_GET);?>
</pre>

如果大家还想深入学习,可以点击这里进行学习,再为大家附两个精彩的专题:Bootstrap学习教程 Bootstrap实战教程

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

相关文章

解析php中获取url与物理路径的总结

在这里我想总结一下取得地址栏内URL及文件所属的我更路径的一些信息:运用$_SERVER[ ]我们可以来完成许多事情:它是一个包含头部(headers),路径信息及脚本位置的数组,数组的...

让PHP支持断点续传的源码

比如第一次请求一个文件的从0到999字节,第二次请求1000到1999字节,以此类推,每次请求1000字节的内容,然后程序通过fseek函数去取得对应的文件位置,然后输出。 复制代码 代...

PHP中的string类型使用说明

注意:PHP没有对string的长度做限制。唯一限制的就是PHP在计算机中的可用内存(php.ini文件中的memory_limit变量的值) 限定字符串范围的方法有4中: 1、单引号;...

用php实现的下载css文件中的图片的代码

作为一个资深并且专业的扒皮人员,在我从初三开始投入伟大的互联网中到现在积累了丰富的扒皮经验。我相信每个做web的程序员也都会有类似的经历。 在扒皮过程中,必不可少的需要下载样式文件中的图...

thinkphp5使用bootstrapvalidator进行异步验证邮箱的示例

本文介绍了thinkphp5使用bootstrapvalidator进行异步验证邮箱的示例,分享给大家,具体如下: js验证 /** * Created by HONGXIN o...