-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignup.php
More file actions
55 lines (49 loc) · 1.51 KB
/
signup.php
File metadata and controls
55 lines (49 loc) · 1.51 KB
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
<?php
require_once("db-manager.php");
if(isset($_POST["signup"])) {
$name = $_POST['name'];
$email = $_POST['email'];
$pwd = $_POST['pwd'];
$SQL = "INSERT INTO `users`( `name`, `email`, `password`) VALUES ('$name','$email','$pwd')";
mysqli_query($cxn, $SQL) or die(mysqli_error($cxn));
echo "<script type='text/javascript'>alert('You have successfully signed up, proceed to login!');</script>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign Up</title>
<link rel="stylesheet" href="./css/login.css">
</head>
<body>
<header>
<h1>
Sign Up
</h1>
</header>
<section>
<form method="post">
<main>
<div>
<label for="">Full name</label>
<input type="text" name="name" id="name">
</div>
<div>
<label for="">Email</label>
<input type="email" name="email" id="email">
</div>
<div>
<label for="">Password</label>
<input type="password" name="pwd" id="pw">
</div>
</main>
<div>
<button type="submit" name="signup">Sign up </button>
</div>
<form>
</section>
</body>
</html>