-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSignUP.php
66 lines (58 loc) · 2.18 KB
/
SignUP.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
<?php
include("database.php");
if(isset($_POST['signup'])){
$email = $_POST['email'];
$password = $_POST['password'];
$sql = "SELECT * FROM users WHERE email = '$email'";
$result = mysqli_QUERY($conn,$sql);
$num = mysqli_num_rows($result);
if($num > 0){
echo '<script>alert("Email already exists!")</script>';
}
else{
$sql = "INSERT INTO users(email,password) VALUES('$email','$password')";
mysqli_query($conn,$sql);
header("location:HomePage.php");
}
}
?>
<!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">
<link rel="stylesheet" href="SignUP.css">
<title> Watch TV Shows Online, Watch Movies Online</title>
</head>
<body>
<div class="container">
<nav class="navbar">
<div class="left">
<img src="images/netflix-logo.png" alt="">
</div>
<div class="right">
<select name="language" class="language">
<option value="English">English</option>
<option value="Hindi">Hindi</option>
</select>
<button><a href="SignIN.php">Sign In</a></button>
</div>
</nav>
<div class="title">
<div class="content">
<h1>Unlimited movies, TV shows and more.</h1>
<h2>Watch anywhere. Cancel anytime.</h2>
<form action="SignUP.php" method="POST">
<h3>Ready to watch? Enter your email to create or restart your membership.</h3>
<div class="email">
<input type="email" name="email" placeholder="Email address" style=" font-size: 14px;">
<input type="password" name="password" placeholder="password" style=" font-size: 14px;">
<button type="submit" name="signup" style="margin:5px; border-radius: 7px;" >Get Started></a></button>
</div>
</form>
</div>
</div>
</div>
</body>
</html>