-
Notifications
You must be signed in to change notification settings - Fork 2
/
signData.php
36 lines (31 loc) · 1.18 KB
/
signData.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
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "aga_courier";
$subscriber_email = $_POST['subscriber_email'];
$subscriber_password = $_POST['subscriber_password'];
$subscriber_fname=$_POST['subscriber_fname'];
$subscriber_lname=$_POST['subscriber_lname'];
$subscriber_gender=$_POST['subscriber_gender'];
$subscriber_city=$_POST['subscriber_city'];
$subscriber_country=$_POST['subscriber_country'];
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "INSERT INTO user_description (subscriber_fname,subscriber_lname,subscriber_email, subscriber_gender, subscriber_city, subscriber_country, subscriber_password)
VALUES ('$subscriber_fname','$subscriber_lname','$subscriber_email','$subscriber_gender','$subscriber_city','$subscriber_country','$subscriber_password')";
if ($conn->query($sql) === TRUE) {
echo "<script>
alert('Registered Successfully');
window.location.href='loginAGA.html';
</script>";
}
else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
?>