forked from hackersdotmu/OnlineCodingCompetition2020
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsign_up.php
More file actions
35 lines (26 loc) · 683 Bytes
/
sign_up.php
File metadata and controls
35 lines (26 loc) · 683 Bytes
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
<?php
include("ddconnection.php");
$conn = mysqli_connect($servername, $username, $password,$db);
$email=$_POST['email'];
$password=$_POST['password'];
$password_confirm=$_POST['password-repeat'];
$policy=$_POST['policy'];
if (!$conn) {
echo'<script>alert("Server error")</script>';
}
else{
if(isset($email)&&isset($password)&&isset($password_confirm)){
if(isset($policy)){
if($password!=$password_confirm){
echo'PASSWORD NOT SAME!!!';
}else{
header('Location:supermarket_add.php?email='.$email.'&password='.$password);
}
}else{
echo'POLICY NOT CHECKED!!!';
}
}else{
echo'EMPTY FIELDS!!!';
}
}
?>