-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.php
executable file
·58 lines (45 loc) · 1.61 KB
/
scripts.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin-2.min.js"></script>
<!-- Page level plugins -->
<script src="vendor/chart.js/Chart.min.js"></script>
<!-- Page level custom scripts -->
<script src="js/demo/chart-area-demo.js"></script>
<script src="js/demo/chart-pie-demo.js"></script>
<?php
$connection = mysqli_connect("localhost","root","","admin");
if(isset($_POST['registerbtn']))
{
$username = $_POST['username'];
$email = $_POST['email'];
$password = $_POST['password'];
$confirm_password = $_POST['confirmpassword'];
if($password === $confirm_password)
{
$query = "INSERT INTO register (username,email,password) VALUES ('$username','$email','$password')";
$query_run = mysqli_query($connection, $query);
if($query_run)
{
echo "done";
$_SESSION['success'] = "Admin is Added Successfully";
header('Location: register.php');
}
else
{
echo "not done";
$_SESSION['status'] = "Admin is Not Added";
header('Location: register.php');
}
}
else
{
echo "pass no match";
$_SESSION['status'] = "Password and Confirm Password Does not Match";
header('Location: register.php');
}
}
?>