<?php

if (!session_start()) {
    session_start();
}
?>
<html>
<head>
<title>Login Admin</title>
   <style type="text/css">
      body{
    margin: 0;
    padding: 0;
background-image:linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0.5)), url(../../pic/book1.jpg);
    background-size: cover;
    background-position: center;
    font-family: sans-serif;
}

.loginbox{
    width: 320px;
    height: 420px;
    background: #000;
    color: #fff;
    top: 50%;
    left: 50%;
    position: absolute;
    transform: translate(-50%,-50%);
    box-sizing: border-box;
    padding: 70px 30px;
}



.avatar{
    width: 100px;
    height: 100px;
    border-radius: 50%;
    position: absolute;
    top: -50px;
    left: calc(50% - 50px);
}

h1{
    margin: 0;
    padding: 0 0 20px;
    text-align: center;
    font-size: 22px;
}

.loginbox p{
    margin: 0;
    padding: 0;
    font-weight: bold;
}

.loginbox input{
    width: 100%;
    margin-bottom:15px;
}

.loginbox input[type="text"], input[type="password"]
{
    border: none;
    border-bottom: 1px solid #fff;
    background: transparent;
    outline: none;
    height:40px;
    color: #fff;
    font-size: 16px;
}
.loginbox input[type="submit"]
{
    border: none;
    outline: none;
    height: 40px;
    background: #fb2525;
    color: #fff;
    font-size: 18px;
    border-radius: 20px;
}
.loginbox input[type="submit"]:hover
{
    cursor: pointer;
    background: #ffc107;
    color: #000;
}
.loginbox a{
    text-decoration: none;
    font-size: 12px;
    line-height: 20px;
    color: darkgrey;
}

.loginbox a:hover
{
    color: #ffc107;
}



.loginboxnew{
    width: 320px;
    height: 460px;
    background: #000;
    color: #fff;
    top: 50%;
    left: 50%;
    position: absolute;
    transform: translate(-50%,-50%);
    box-sizing: border-box;
    padding: 70px 30px;
}

.loginboxnew p{
    margin: 0;
    padding: 0;
    font-weight: bold;
}

.loginboxnew input{
    width: 100%;
    margin-bottom:15px;
}

.loginboxnew input[type="text"], input[type="password"]
{
    border: none;
    border-bottom: 1px solid #fff;
    background: transparent;
    outline: none;
    height:40px;
    color: #fff;
    font-size: 16px;
}
.loginboxnew input[type="submit"]
{
    border: none;
    outline: none;
    height: 40px;
    background: #fb2525;
    color: #fff;
    font-size: 18px;
    border-radius: 20px;
}
.loginboxnew input[type="submit"]:hover
{
    cursor: pointer;
    background: #ffc107;
    color: #000;
}
.loginboxnew a{
    text-decoration: none;
    font-size: 12px;
    line-height: 20px;
    color: darkgrey;
}

.loginboxnew a:hover
{
    color: #ffc107;
}




.error{
position:absolute;
top:5%;
left:2%;

color: #ff0000;

text-align:left;
width:25%;
padding:2%;
}


.errornew{
    
    color: #ff0000;
    
    text-align:left;
    width:100%;
    padding:2%;
}


      
      </style></head>
	
	
	<script type="text/javascript" src="login.js"></script> 
	<script src='https://code.jquery.com/jquery-2.1.3.min.js'></script>
<body>


    <div class="loginboxnew">
    <img src="../../pic/avatar.png" class="avatar">
        <h1>Welcome</h1>
        <form name="myForm1" onsubmit="return RegvalidateForm()" action="insert.php"  method="post" >
			<p>Name</p>
            <input type="text" name="name" pattern="[A-Z]{0-15}[a-z]{0-15}" id="user_name" placeholder="Enter name" />
            
			<p>Email</p>
            <input type="text" name="email"  id="mailid" placeholder="Enter Email" />
			
            <p>Password</p>
            <input type="password" name="password1" id="passwordKey" placeholder="Enter Password" />
			
            <input type="submit" name="submitRegister" value="submit"  />

            <div class="errornew">
			<?php //session_start();
            if (isset($_SESSION['Registererror']) == 1) {
                echo $_SESSION['Registererror'];
            } ?>
			<div id="p"></div>
			<div id="p1"></div>
			<div id="p2"></div>
			</div>
			
        </form>
    </div>
<script>

</body>
</head>
</html>