-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathenterdata.php
85 lines (70 loc) · 2.92 KB
/
enterdata.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<style>
h1.ex1 {
padding-top: 25px;
font-family: Arial, Helvetica, sans-serif
}
</style>
<title>Plasma Donation</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<a class="navbar-brand" href="/index.html" style="max-width: 4%;">
<img src="/hospi.png" class="img-fluid">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="/index.html">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/REGISTERprotoplasma.html">Donate Plasma</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/REQUESTprotoplasma.html">Search Donor</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/ADMINlogin.html">Admin</a>
</li>
</ul>
</div>
</nav>
<h1 align ="center" class="ex1 text-danger">
<?php
$link = mysqli_connect("sql309.epizy.com", "epiz_28490176", "Yjx7sbh3Pf9fB", "epiz_28490176_plasma");
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$sql = "INSERT INTO plasma (first_name, mob_number, email_id, blood_group, recovered_date) VALUES ('".$_REQUEST["first_name"]."', '".$_REQUEST["mob_number"]."', '".$_REQUEST["email_id"]."' , '".$_REQUEST["blood_group"]."' , '".$_REQUEST["recovered_date"]."')";
if(mysqli_query($link, $sql)){
echo "Thank you for the contribution";
}
else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
mysqli_close($link);
?>
</h1>
<br> <p align = "center" class = "ex1 text-muted">Patients will try to contact to you. </p><!--on: <?php echo $_POST["mob_number"];?> or else <?php echo $_POST["email_id"];?></p>-->
<br><br>
<div class="container col-5 mt-lg-4">
<a href="/index.html" >
<button type="submit" class="btn btn-success form-control btn-block"> Back to Home </button>
</a>
</div>
</div>
</body>
</html>