<! DOCTYPE html>
<meta charset= "UTF-8" >
<title> Login 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"/>
<body>
<div class= "Container" >
<div class= "Img-responsive" ></div>
<form class= "Form-signin" id= "Form1" method= "Post" action= "login.php" >
<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>
<?php
Header ("Content-type:text/html;charset=utf-8");
/* $mysql _username= "localhost"; Connect to database user name
$mysql _password= ""; Connect Database Password */
$mysql _database= "Test"; The name of the database
Connecting to a database
$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 ' registration failed! ';
}
}
?>
Form Submit form to database