-
Notifications
You must be signed in to change notification settings - Fork 0
/
sign_up.php
44 lines (33 loc) · 892 Bytes
/
sign_up.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
<?php
$Fname = $_POST['fullName'];
$Uname = $_POST['userName'];
$Email = $_POST['email'];
$PNo = $_POST['phone'];
$Password = $_POST['password'];
$Cpassword = $_POST['confirmPassword'];
$Gender = $_POST['gdot'];
$servername = "localhost";
$username = "root";
$password = "";
$database ="Ballotbox23_data";
$con = mysqli_connect($servername,$username,$password,$database);
if (!$con)
{
die("error:".mysqli_connect_error());
}
if($Password == $Cpassword) {
$sql = "INSERT INTO `reg_user`(`user_fname`, `user_name`, `user_gender`, `user_email`, `user_password`, `user_pn`) VALUES ('$Fname','$Uname','$Gender','$Email','$Password','$PNo')";
if(mysqli_query($con,$sql))
{
echo "registration successfully";
header('location: log_in.html');
}
else
{
echo"Somthing went wrong";
}
}
else{
echo "Password not matched";
}
?>