-
Notifications
You must be signed in to change notification settings - Fork 0
/
college.php
193 lines (142 loc) · 6.1 KB
/
college.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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<?php
$message="";
$message1="";
session_start();
require_once("connect.php");
error_reporting(E_ERROR | E_PARSE);
$sql="SELECT * FROM `college_details`";
$result=mysqli_query($connect,$sql);
$a=$result->fetch_assoc();
if(empty($_SESSION['email']))
{
header("location:login.php"); }
$aa=$_SESSION["aadh"];
$sql="SELECT * FROM `college_details` WHERE aadhaar= '$aa' ";
$result=mysqli_query($connect,$sql);
$b=$result->fetch_assoc();
if ($b['aadhaar']===$_SESSION['aadh']) {
header("location:bank.php");
}
if(isset($_POST['next1'])){
if($_POST['usn']!==$a['usn']){
$aadh=$_SESSION['aadh'];
$usn=$_SESSION['usn']=$_POST['usn'];
$university=$_SESSION['university']=$_POST['university'];
$collegename=$_SESSION['collegename']=$_POST['collegename'];
$collegetaluka=$_SESSION['collegetaluka']=$_POST['collegetaluka'];
$collegedistrict=$_SESSION['collegedistrict']=$_POST['collegedistrict'];
$course=$_SESSION['course']=$_POST['course'];
$seattype=$_SESSION['seattype']=$_POST['seattype'];
$year=$_SESSION['year']=$_POST['year'];
$fees=$_SESSION['fees']=$_POST['fees'];
$pyear=$_SESSION['pyear']=$_POST['pyear'];
$marks=$_SESSION['marks']=$_POST['marks'];
$percentage=$_SESSION['percentage']=$_POST['percentage'];
$sql = " INSERT INTO college_details(aadhaar,usn,university,collegename,collegetaluka,collegedistrict,course,seattype,presentyear,fees,previousyear,marks,percentage) VALUES ('$aadh','$usn','$university','$collegename','$collegetaluka','$collegedistrict','$course','$seattype','$year','$fees','$pyear','$marks','$percentage')";
$result = mysqli_query($connect, $sql);
if($result)
{
header("location:bank.php");
}
}
else{
$message1="Please Check USN Number ";
}
}
?>
<!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: 8%;
width: 40%;
height: auto;
top: 5%;
left: 25%;
right: 25%;
/* margin-left:50%;
margin-right:50%; */
}
</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>
<div class="message">
<?php
echo"$message";
?>
</div>
<section >
<div class="from">
<form action="college.php" method="post" enctype='multipart/form-data'>
<div class="span">College Details</div>
<div class="text">
<input type="text" name="usn" id="usn" placeholder="USN" Required>
</div>
<div class="message1"><?php echo"$message1"; ?></div>
<div class="text">
<input type="text"name="university" id="university" placeholder='University Name' Required>
</div>
<div class="text">
<input type="text" name="collegename" id="collegename" placeholder='College Name' Required>
</div>
<div class="text">
<input type="text" name="collegetaluka" id="collegetaluka" placeholder='College Taluka' Required>
</div>
<div class="text">
<input type="text" name="collegedistrict" id="collegedistrict" placeholder='College District' Required>
</div>
<div class="text">
<input type="text" name="course" id="course" placeholder='Course' Required>
</div>
<div class="text">
<input type="text" name="seattype" id="seattype" placeholder='Seat Type' Required>
</div>
<div class="text">
<input type="number" name="year" id="year" placeholder='Which year are you studying?' min="1" max="6" Required>
</div>
<div class="text">
<input type="number" name="fees" id="fees" placeholder='Total Fees' Required>
</div>
<div class="text">
<input type="number" name="pyear" id="pyear" placeholder='Previous Studying Year' max="5" Required>
</div>
<div class="text">
<input type="number" name="marks" id="marks" placeholder='Previous Year Total Marks' Required>
</div>
<div class="text">
<input type="number" name="percentage" id="percentage" placeholder='Previous Year Percentage' min="35" max="100" 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="next1" >
</div>
</form>
</div>
</section>
</body>
</html>