-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
123 lines (108 loc) · 3.58 KB
/
index.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
<html>
<head>
<title>HOME</title>
<title>College Search</title>
<style>
*{
margin: 0px;
padding: 0px;
}
#head{
width: 100%;
height: 120px;
background-color: forestgreen;
}
.top
{
font-size: 50;
margin-left: 350px;
margin-top: 300px;
}
.bottom
{
margin-left: 430px;
font-size: 30;
margin-bottom: 20px;
}
.foot{
width: 100%;
height: 30px;
position: relative;
background-color: forestgreen;
margin-top: 10%;
}
</style>
</head>
<body style="background-color: gray;">
<div id='head'>
<font class='top'>COLLEGE ADMISSION PREDICTOR</font>
<br>
<font class="bottom">(Boards / JEE(Mains + Advance) / NEET / AIIMS)</font>
</div>
<?php
global $name,$mail,$number,$address,$password;
$con = mysqli_connect('127.0.0.1','root','');
if(!$con)
{
echo 'Not Connected to Server.';
}
if(!mysqli_select_db($con,'punestudents'))
{
echo 'Database not selected.';
}
if(isset($_POST["t1"]) && !empty($_POST["t1"]))
{
$name = $_POST["t1"];
}
if(isset($_POST["t2"]) && !empty($_POST["t2"]))
{
$mail = $_POST["t2"];
}
if(isset($_POST["t3"]) && !empty($_POST["t3"]))
{
$number = $_POST["t3"];
}
if(isset($_POST["t4"]) && !empty($_POST["t4"]))
{
$address = $_POST["t4"];
}
if(isset($_POST["t5"]) && !empty($_POST["t5"]) == isset($_POST["t6"]) && !empty($_POST["t6"]))
{
$password = $_POST["t5"];
}
$sql1 = "INSERT INTO studentdetails VALUES('$name','$mail','$number','$address','$password')";
if(!mysqli_query($con,$sql1))
{
echo 'NOT INSERTED';
}
else
{
echo '';
}
?>
<center>
<div style="margin-top: 200px; height: 220px; width: 280px; background-color: powderblue">
<form action="validateLogin.php" method="post">
<h3><u>Login to College Portal</u></h3>
<br>
<input type="text" id="t1" name="t1" placeholder="Enter your e-mail" size="28" style="background-color: darkorange; height: 28px ">
<br>
<br>
<input type="password" id="t2" name="t2" placeholder="Enter password" size="28" style="background-color: darkgrey; height: 28px">
<br>
<center><input type="submit" value="Login" style="background-color: lightgreen"></center><br>
</form>
<form action="registerform.php" method="post">
<center><input type="submit" value="New User Register" style="background-color: red"></center>
</form>
<br>
<form action="colgreg.html" method="post">
<center><input type="submit" value="College Registration" style="background-color: pink"></center>
</form>
</div>
<footer class="foot">
<p><center><b>@copyright | Designed by IMED,Pune</b></center></p>
</footer>
</center>
</body>
</html>