-
Notifications
You must be signed in to change notification settings - Fork 0
/
donar.php
120 lines (97 loc) · 3.06 KB
/
donar.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
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
<?php
include_once 'header.php';
include_once 'init.php';
?>
<div class="login">
<form class="form-horizontal" action="donar_backend.php" method="post">
<fieldset>
<!-- Form Name -->
<legend>Donation details</legend>
<div class="card" style="width:50%;float:center;">
<div class="form-group">
<label class="col-md-4 control-label" for="selectbasic">Category</label>
<div class="col-md-4">
<select id="gender_class" name="gender_class" class="form-control" required>
<option value="F">Female</option>
<option value="M">Male</option>
<option value="A">All</option>
</select>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="textinput">Amount</label>
<div class="col-md-4">
<input id="donation_amt" name="donation_amt" type="text" placeholder="" class="form-control input-md" required>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="singlebutton"></label>
<div class="col-md-4">
<button id="singlebutton" name="singlebutton" class="btn btn-primary">Save</button>
</div>
</div>
</div>
</fieldset>
</form>
<form class="form-horizontal" action="update_donor.php" method="post">
<fieldset>
<!-- Form Name -->
<legend>Update details</legend>
<?php
$PD=" SELECT * FROM `donor` where donor_id='$session_user_id'";
if ($PD_query_run=mysqli_query($con,$PD) )
{
while ($query_execute=mysqli_fetch_assoc($PD_query_run))
{
echo '
<div class="card" style="width:50%;float:center;">
<div class="form-group">
<label class="col-md-4 control-label" for="textinput">First-Name</label>
<div class="col-md-4">';
echo '<input id="donation_amt" name="FName" type="text" placeholder="" class="form-control input-md" value="'.$query_execute['donor_fname'].'" >
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="textinput">Last-name</label>
<div class="col-md-4">
<input id="donation_amt" name="Lname" type="text" placeholder="" class="form-control input-md" value="'.$query_execute['donor_lname'].'">
</div>
</div>';
}
}
else
{
echo '
<form class="form-horizontal" action="update_donor.php" method="post">
<fieldset>
<div class="card" style="width:50%;float:center;">
<div class="form-group">
<label class="col-md-4 control-label" for="textinput">First-Name</label>
<div class="col-md-4">
<input id="donation_amt" name="FName" type="text" placeholder="" class="form-control input-md" >
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="textinput">Last-name</label>
<div class="col-md-4">
<input id="donation_amt" name="Lname" type="text" placeholder="" class="form-control input-md">
</div>
</div>';
}
?>
<div class="form-group">
<label class="col-md-4 control-label" for="singlebutton"></label>
<div class="col-md-4">
<button id="singlebutton" name="singlebutton" class="btn btn-primary">Update</button>
</div>
</div>
</div>
</fieldset>
</form>
</div>
<?php
include_once 'footer.php';
?>