-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdonation-form.php
More file actions
137 lines (115 loc) · 6.08 KB
/
donation-form.php
File metadata and controls
137 lines (115 loc) · 6.08 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php include './components/header.php'; ?>
<div class="ui container">
<!-- Top Navigation Bar -->
<?php include './components/top-menu.php'; ?>
<!-- BODY Content -->
<div class="ui grid">
<!-- Left menu -->
<?php include './components/side-menu.php'; ?>
<!-- right content -->
<div class="twelve wide column">
<h1>Donation Application</h1>
<?php
if(isset($_POST['submit_donation'])) {
$program = $_POST['program'];
$amount = $_POST['amount'];
$checkno = $_POST['check'];
$bank_name = $_POST['bank_name'];
$place = $_POST['place'];
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$address = $_POST['address'];
$sql = "INSERT INTO donation (program, amount, checkno, bank_name, place, d_name, email, phone, d_address)
VALUES ('$program', '$amount', '$checkno', '$bank_name', '$place', '$name', '$email', '$phone', '$address')";
if ($conn->query($sql) === TRUE) {
echo "<script> alert('Successfully Donation form Submitted'); </script>";
} else {
echo "<script> alert('Error in Insertion'); </script>";
}
$conn->close();
}
?>
<form action="<?php $_PHP_SELF ?>" method="post" class="ui form">
<h4 class="ui dividing header">Select the program to sponsor</h4>
<div class="grouped fields">
<label for="program">Programs: </label>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="program" tabindex="0" class="hidden" id="aakar" value="Aakar">
<label for="aakar">AAKAR - the first step</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="program" tabindex="0" class="hidden" id="ahar" value="Ahar">
<label for="ahar">AHAR APURTI</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="program" tabindex="0" class="hidden" id="avsar" value="Avsar">
<label for="avsar">AVSAR - a chance</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="program" tabindex="0" class="hidden" id="lakshya" value="Lakshya">
<label for="lakshya">Lakshya</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="program" tabindex="0" class="hidden" id="parivartan" value="Parivartan">
<label for="parivartan">PARIVARTAN - change of direction</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="program" tabindex="0" class="hidden" id="uphaar" value="Uphaar">
<label for="uphaar">UPHAAR - gift a smile</label>
</div>
</div>
</div>
<div class="field">
<label>Amount</label>
<input type="number" name="amount" min="1" placeholder="Amount" required>
</div>
<h4 class="ui dividing header">Check and Demand Draft</h4>
<div class="field">
<label>Check / DD no.</label>
<input type="text" name="check" placeholder="Check / DD no." required>
</div>
<div class="field">
<label>Bank Name</label>
<input type="text" name="bank_name" placeholder="Bank Name" required>
</div>
<div class="field">
<label>Place</label>
<input type="text" name="place" placeholder="Place" required>
</div>
<h4 class="ui dividing header">Personal Information</h4>
<div class="field">
<label>Name</label>
<input type="text" name="name" placeholder="Full Name" required>
</div>
<div class="field">
<label>Email</label>
<input type="email" name="email" placeholder="Email" required>
</div>
<div class="field">
<label>Phone no.</label>
<input type="tel" name="phone" placeholder="Phone / Mobile" required>
</div>
<div class="field">
<label>Address</label>
<input type="text" name="address" placeholder="Address" required>
</div>
<button name="submit_donation" class="ui primary button" type="submit">Submit</button>
<button class="ui button" type="reset">Reset</button>
</form>
<span class="p-20"></span>
</div>
</div>
</div>
<?php include './components/footer.php'; ?>