<!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"><title>注册数码广场</title><!-- Bootstrap --><link href="bootstrap/css/bootstrap.min.css" rel="stylesheet"><!--pintu--><!--HTML5 shim and Respond.js forIE8 support of HTML5 elements and media queries --><!--WARNING: Respond.js doesn't work if you view the page via file:// --><!--[if lt IE9]><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]--><style>.a1{
width :100px;}
body{
background-color:#f5f5f5;}.box{
background-color:#fff;}.huanhang
{
height:30px;}.ihang
{
display: inline-block;}
span{
color:#ff6700}</style></head><body ><form action="registercheck.php" method="POST"><div class="modal-dialog" style="margin-top: 10%;"><div class="modal-content"><div class="modal-header"><h4 class="modal-title text-center" id="myModalLabel">注册数码广场</h4></div><div class="modal-body" id ="model-body"><div class="form-group"><input type="text"class="form-control"placeholder="用户名" autocomplete="off" name="username"></div><div class="form-group"><input type="password"class="form-control" placeholder="密码" autocomplete="off" name="password"></div></div><div class="modal-footer"><div class="form-group"><button type="submit"class="btn btn-primary form-control">注册</button></div></div></div><!--/.modal-content --></div></form>
后台registerchek.php
<?php$con=mysqli_connect("localhost:3306","root","123456");if(!$con){die('Could not connect: '.mysqli_error($con));}mysqli_select_db($con,"student");mysqli_query($con,"INSERT INTO user
VALUES ('$_POST[username]', '$_POST[password]')");mysqli_close($con);header('location:index1.html');?>