-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.php
More file actions
140 lines (130 loc) · 5.95 KB
/
dashboard.php
File metadata and controls
140 lines (130 loc) · 5.95 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
138
139
140
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CampusConnect <Details></Details></title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="try.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.9.2/umd/popper.min.js" integrity="sha512-2rNj2KJ+D8s1ceNasTIex6z4HWyOnEYLVC3FigGOmyQCZc2eBXKgOxQmo3oKLHyfcj53uz4QMsRCWNbLd32Q1g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<!-- <script src="jquery-3.7.1.min.js"></script> -->
<script src="jquery.js"></script>
</head>
<body>
<header>
<div class="navbar">
<div class="nav-logo">
<div class="logo"></div>
<div class="logo-text">
<p class="nav-logo-name">CAMPUS CONNECT</p>
<p class="nav-logo-tagline">UNLOCK YOUR FUTURE</p>
</div>
</div>
<div class="email-user-display" style="margin-left: 800px;">
<p id="msg"></p>
</div>
<div class="nav-btn-box">
<button class="btn" type="button" id="signOutBtn">Sign Out</button>
</div>
</div>
</header>
<main>
<div class="container">
<form action="" name='frm' method="post" id='collegeForm'>
<div class="title">
<h3>Select Your Preferred College</h3>
</div>
<div class="education-details">
<div class="input-box">
<label for="state">State</label>
<select type="text" name="state" id="state" class="form-control">
<option>--Select One--</option>
<?php
$conn=mysqli_connect('localhost','root','','collegeinfo');
$query=mysqli_query($conn,"select * from state ");
while($row=mysqli_fetch_array($query)){
?>
<option value="<?php echo $row['S_ID']; ?>"><?php echo $row['S_Name']; ?> </option>
<?php
}
?>
</select>
</div>
<div class="input-box">
<label for="college">College</label>
<select type="text" name="college" id="college" class="form-control">
<option>--Select One--</option>
</select>
</div>
<div class="input-box">
<label for="course">Course</label>
<select type="text" name="course" id="course" class="form-control" >
<option>--Select One--</option>
</select>
</div>
</div>
<div class="btn-box">
<button type="button" onclick="submitForm()">Submit</button>
</div>
</form>
</div>
</main>
<footer>
<div class="foot-top">
<a class="going-top" href="#" style="text-decoration: none; color:aliceblue">Back to top <i class="fa-solid fa-angles-up"></i></a>
</div>
<div class="foot-options">
<ul>
<a href="#" style="text-decoration: none; color:aliceblue"> Legal disclosure</a>
<a href="#" style="text-decoration: none; color:aliceblue"> Terms and Conditions</a>
<a href="#" style="text-decoration: none; color:aliceblue"> Privacy Policy</a>
<a href="#" style="text-decoration: none; color:aliceblue"> Contact Us</a>
</ul>
<p>© 2025 CampusConnect</p>
</div>
</footer>
<script>
let signOutBtn=document.getElementById('signOutBtn');
let Signout=()=>{
sessionStorage.removeItem("user-creds");
window.location.href='login.html';
}
signOutBtn.addEventListener('click',Signout);
</script>
<script>
let userCreds=JSON.parse(sessionStorage.getItem("user-creds"));
let msg=document.getElementById('msg');
let CheckCreds=()=>{
if(!sessionStorage.getItem("user-creds")){
// window.location.href='index.html';
console.log("could not fetch user email");
}
else{
msg.innerText= `${userCreds.email}`;
}
}
window.addEventListener('load', CheckCreds);
</script>
<script>
function submitForm() {
var formData = $('#collegeForm').serialize();
$.ajax({
method: "POST",
url: "collegeinfo.php",
data: formData,
success: function(data){
alert('Form submitted successfully');
window.location.href = 'documents.php';
},
error: function(error){
console.error('Error:', error);
}
});
}
</script>
</body>
</html>