-
Notifications
You must be signed in to change notification settings - Fork 0
/
createadmin.php
39 lines (32 loc) · 954 Bytes
/
createadmin.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
<?php
require 'config/config.php';
/*$sql0 = "TRUNCATE TABLE admin";
$query0 = mysqli_query($con, $sql0);*/
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<?php
if(isset($_POST['regbu'])) {
$fname = $_POST['fname'];
$email = $_POST['mail'];
$password = $_POST['pass'];
//$password = '4kzVQFwsJ$JRjyCz';
$password = password_hash($password, PASSWORD_BCRYPT);
$sql = "INSERT INTO admin (FullName, AdminEmail, Password) VALUES ('$fname', '$email', '$password')";
$query = mysqli_query($con, $sql);
echo $sql;
}
?>
<form action="createadmin.php" method="post">
<input type="text" name="fname" value="">
<input type="text" name="mail" value="">
<input type="text" name="pass" value="">
<input type="submit" name="regbu" value="">
</form>
</body>
</html>