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 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 content=""> <meta content=""> <link href=""> <title>Signin Template for Bootstrap</title> <!-- Bootstrap core CSS --> <link href="https://www.jb51.net/bootstrap.min.css"> <!-- Custom styles for this template --> <link href="https://www.jb51.net/signin.css"> <!-- Just for debugging purposes. Don't actually copy these 2 lines! --> <!--[if lt IE 9]><script src=""></script><![endif]--> <script src=""></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> <form method = "get" action = "form-signin.php"> <h2>Please sign in</h2> <label for="inputEmail">Email address</label> <input type="email" name ="inputEmail"class="form-control" placeholder="Email address" required autofocus> <label for="inputPassword">Password</label> <input type="password"name ="inputPassword" placeholder="Password" required> <div> <label> <input type="checkbox" value="remember-me"> Remember me </label> </div> <button type="submit">Sign in</button> </form> </div> <!-- /container --> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> <script src=""></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实战教程

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/54e497e504f214e73f352ddc20092de0.html