-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrequest.php
More file actions
38 lines (26 loc) · 824 Bytes
/
Copy pathrequest.php
File metadata and controls
38 lines (26 loc) · 824 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
36
37
38
<?php
$Name=$_POST['full_name'];
$Email=$_POST['email'];
$Location=$_POST['location'];
$City=$_POST['city'];
$Blood_groups = $_POST['blood_groups'];
$Contact=$_POST['mob_no'];
$Gender=$_POST['gender'];
$servername = "localhost";
$username = "root";
$password = "";
$db="donation_desk"; //database name
$conn = new mysqli($servername, $username, $password,$db);
//Insert query
$sql= "INSERT INTO `blood_request` (`Full_Name`,`Email`,`Location`,`City`,`Blood_Group`,`Contact`,`Gender`)
VALUES ('$Name','$Email','$Location','$City','$Blood_groups','$Contact','$Gender')";
if($conn->query($sql))
{
include('success_modal.html');
}
else
{
echo "Error: ".$sql."<br>".$conn->error;
}
$conn->close();
?>