demoreg.php
<?php include('server.php') ?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/styles/normalize.css">
<link rel="stylesheet" href="assets/styles/main.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<title>َRegistration Form</title>
<link rel="stylesheet" href="css/style_demoreg.css">
<script type="text/javascript">
function pswcheck(){
var a = document.getElementById("password").value;
var b = document.getElementById("confirm_password").value;
if(a != b){
document.getElementById('msg1').innerHTML="**Password did'n matched";
return false;
}
}
</script>
</head>
<body>
<div class="container">
<div class="myCard">
<div class="row">
<div class="col-md-12">
<div class="myLeftCtn">
<form action="demoreg.php" class="myForm text-center" method="post" onsubmit="return pswcheck()">
<?php include('error.php'); ?>
<header>Create new Account</header>
<div class="form-group">
<i class="fas fa-user"></i>
<input class="myInput" type="text" name="name" value="" placeholder="Name" id="firstname" required>
<div class="invalid-feedback">Please fill out this field</div>
</div>
<div class="form-group">
<i class="fas fa-user"></i>
<input class="myInput" type="text" name="roll" value="" placeholder="Roll Number" id="lastname" required>
<div class="invalid-feedback">Please fill out this field</div>
</div>
<div class="form-group">
<i class="fas fa-envelope"></i>
<input class="myInput" type="email" name="email" value="" placeholder="Email" id="email" required>
<div class="invalid-feedback">Please fill out this field</div>
</div>
<div class="form-group">
<i class="fas fa-graduation-cap"></i>
<select class="myInput" id="dropdown" data-target="province" name="branch" required>
<option value="-1">SELECT BRANCH</option>
<option>Computer Science</option>
</select>
<div class="invalid-feedback">Please fill out this field</div>
</div>
<div class="form-group">
<i class="fas fa-lock"></i>
<input class="myInput" type="password" name="password1" value="" placeholder="Password" id="password" required>
<div class="invalid-feedback">Please fill out this field</div>
</div>
<div class="form-group">
<i class="fas fa-lock"></i>
<input class="myInput" type="password" name="password2" value="" placeholder="Confirm Password" id="confirm_password" required><br><span id="msg1" style="color: red"></span>
<div class="invalid-feedback">Please fill out this field</div>
</div>
<input class="butt" type="submit" name="submit" value="CREATE ACCOUNT"><br>
<a href="index.php" class="anchor">already have account?</a>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
</html>