php bootstrap实现简单登录
程序员文章站
2024-04-01 20:09:40
本文实例为大家分享了php bootstrap实现简单登录的方法,供大家参考,具体内容如下
所有文件
记住是获取name键值对 from 里面 a...
本文实例为大家分享了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实战教程
以上就是本文的全部内容,希望对大家的学习有所帮助