-
Notifications
You must be signed in to change notification settings - Fork 0
/
createuser.php
75 lines (72 loc) · 3.1 KB
/
createuser.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Creation</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="css/createuser.css">
<link rel="stylesheet" href="css/table.css">
<link rel="stylesheet" href="css/navbar.css">
</head>
<body>
<?php
include 'config.php';
if(isset($_POST['submit'])){
$name = $_POST['name'];
$mailid = $_POST['email'];
$amount = $_POST['balance'];
$sql_query = "insert into users(name,email,balance) values ('{$name}','{$email}','{$balance}')";
$ans = mysqli_query($conn,$sql_query);
if($ans)
{
echo "alert('User Created Sucessfully!..');
window.location = 'transfermoney.php'";
}
}
?>
<?php
include 'navbar.php';
?>
<h2 class="text-center">Create User</h2>
<br>
<div class="background">
<div class="container">
<div class="screen">
<div class="screen-header">
<div class="screen-header-right">
<div class="screen-header-ellipsis"></div>
<div class="screen-header-ellipsis"></div>
<div class="screen-header-ellipsis"></div>
</div>
</div>
<div class="screen-body">
<div class="screen-body-item left">
<img class="img-fluid" src="img/user3.jpg" style="border: none; border-radius: 50%;">
</div>
<div class="screen-body-item">
<form class="app-form" method="post">
<div class="app-form-group">
<input class="app-form-control" placeholder="NAME" type="text" name="name" required>
</div>
<div class="app-form-group">
<input class="app-form-control" placeholder="EMAIL" type="email" name="email" required>
</div>
<div class="app-form-group">
<input class="app-form-control" placeholder="BALANCE" type="number" name="balance" required>
</div>
<br>
<div class="app-form-group button">
<input class="app-form-button" type="submit" value="CREATE" name="submit"></input>
<input class="app-form-button" type="reset" value="RESET" name="reset"></input>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
</body>
</html>