-
Notifications
You must be signed in to change notification settings - Fork 0
/
bank.php
165 lines (123 loc) · 4.84 KB
/
bank.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?php
$message="";
$message1="";
session_start();
require_once("connect.php");
error_reporting(E_ERROR | E_PARSE);
$aa=$_SESSION["aadh"];
$sql="SELECT * FROM `bank_details`";
$result=mysqli_query($connect,$sql);
$a=$result->fetch_assoc();
$sql="SELECT * FROM `bank_details` WHERE aadhaar= '$aa' ";
$result=mysqli_query($connect,$sql);
$b=$result->fetch_assoc();
if ($b['aadhaar']==$_SESSION['aadh']) {
header("location:attachment.php");
}
if(empty($_SESSION['email']))
{
header("location:login.php"); }
if(isset($_POST['next2'])){
if($_POST['accnumber']===$_POST['acnumber']){
$aadh=$_SESSION['aadh'];
$passbookname=$_SESSION['passbookname']=$_POST['passbookname'];
$accnumber=$_SESSION['accnumber']=$_POST['accnumber'];
$acnumber=$_SESSION['acnumber']=$_POST['acnumber'];
$bname=$_SESSION['bname']=$_POST['bname'];
$branch=$_SESSION['branch']=$_POST['branch'];
$bdistrict=$_SESSION['bdistrict']=$_POST['bdistrict'];
$ifsc=$_SESSION['ifsc']=$_POST['ifsc'];
$sql = " INSERT INTO bank_details(aadhaar,passbookname,accountnumber,bankname,branch,bankdistrict,ifsc) VALUES ('$aadh','$passbookname','$accnumber','$bname','$branch','$bdistrict','$ifsc')";
$result = mysqli_query($connect, $sql);
if($result)
{
header("location:attachment.php");
}
}
else{
$message1="account number must be same";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Scholarship</title>
<link rel="stylesheet" href="css/style.css">
<style>
.from{
border-radius: 5%;
background-color:white ;
font-family: 'Courier New', Courier, monospace;
position: absolute;
padding: 3% 5% 3% 5%;
margin-top: 2%;
width: 30%;
height:auto;
top: 15%;
left: 30%;
right: 30%;
}
</style>
</head>
<body>
<section>
<nav>
<h1>Scholarship</h1>
<div class="navlink">
<ul>
<li><a href="about.html">About</a></li>
<li><a href="home.php?data=1">Home</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</div>
</nav>
</section>
<?php
if(empty($_SESSION['email']))
{
header("location:login.php"); }
else{
?>
<section >
<div class="from">
<form action="bank.php" method="post" enctype='multipart/form-data'>
<div class="span">Bank Details</div>
<div class="form">
<div class="text">
<input type="text" name="passbookname" id="passbookname" placeholder='Name as per Passbook' Required>
</div>
<div class="text">
<input type="number" name="accnumber" id="accnumber" placeholder='Account Number' Required>
</div>
<div class="text">
<input type="number" name="acnumber" id="acnumber" placeholder='Account number again' Required>
</div>
<div class="message1"><?php echo"$message1"; ?></div>
<div class="text">
<input type="text" name="bname" id="bname"placeholder='Bank Name' Required>
</div>
<div class="text">
<input type="text" name="branch" id="branch"placeholder='Branch' Required>
</div>
<div class="text">
<input type="text" name="bdistrict" id="bdistrict"placeholder='Bank District' Required>
</div>
<div class="text">
<input type="text" name="ifsc" id="ifsc" placeholder='IFSE code' Required>
</div>
<div class="checkbox1">
<input type="checkbox" name="checkbox" Required> Verify details before going to Next Page
</div>
<div class="button">
<input type="submit" value="→" name="next2" >
</div>
</form>
</div>
</section>
<?php } ?>
</body>
</html>