-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignup.php
27 lines (26 loc) · 933 Bytes
/
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
<?php
$username = $_POST['username'];
$email = $_POST['email'];
$mobno = $_POST['mobno'];
$address = $_POST['address'];
$country = $_POST['country'];
$age = $_POST['age'];
$gender = $_POST['gender'];
$dob = $_POST['dob'];
$password = $_POST['password'];
// Database connection
$conn = mysqli_connect('localhost','root','','donationsystem');
if($conn){
$stmt = $conn->prepare("insert into user(username,email,mobno,address,country,age,gender,dob,password)
values(?,?,?,?,?,?,?,?,?)");
$stmt->bind_param("ssississs", $username,$email,$mobno,$address,$country,$age,$gender,$dob,$password);
$stmt->execute();
echo "<script>alert('User Registration Successfull!')</script>";
echo "<button onclick=\"window.location.href='SignIn.html'\">Log In</button> to continue";
$stmt->close();
$conn->close();
}
else {
echo "Connection failed";
}
?>