<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登录angularJS</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/login.css" />
</head>
<body>
<div class="container">
<div class="img-responsive"></div>
<form class="form-signin" id= "form1" method="post" action="login.php">
<h3>Please sign in</h3>
<label class="sr-only" for="inputEmail" >Email address</label>
<input id="inputEmail" class="form-control" placeholder="Email address" required=""
autofocus="" type="email" name="email"/>
<label class="sr-only" for="inputPassword" >Password</label>
<input id="inputPassword" class="form-control" placeholder="Password" required=""
autofocus="" type="password" name="password"/>
<div class="checkbox">
<label>
<input value="rember-me" type="checkbox" />
Remeber me
</label>
</div>
<button class="btn btn-lg btn-primary btn-block">Sign in</button>
</form>
</div>
</body>
</html>
<?php
header("content-type:text/html;charset=utf-8");
/* $mysql_username="localhost"; // 连接数据库用户名
$mysql_password=""; // 连接数据库密码*/
$mysql_database="test"; // 数据库的名字
// 连接到数据库
$conn = mysql_connect('localhost','root','') or die("MYSQL_connect:".mysql_errno());
mysql_select_db($mysql_database);
$email=$_POST['email'];
$password=$_POST['password'];
if(isset($email)){
$sql = "INSERT INTO `login` VALUES ('$email','$password')";
$query = mysql_query($sql);
if($query){
echo '1';
}else{
echo '注册失败!';
}
}
?>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。