-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalid.js
More file actions
40 lines (36 loc) · 1.11 KB
/
valid.js
File metadata and controls
40 lines (36 loc) · 1.11 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
function myfunction() {
var x = document.getElementById("pass");
if (x.type === "password") {
x.type = "text";
}
else {
x.type = "password";
}
}
function validate() {
var username = document.getElementById("username").value;
var password = document.getElementById("pass").value;
if (username == "Faculty" && password == "1234") {
alert("Login Succesfull");
window.location.replace("homepage.php");
return false;
}
else if (username == "Student" && password == "4321") {
alert("Login Succesfull");
window.location.replace("Stud_homepage.php");
return false;
}
else if (username == "H.auth" && password == "12345") {
alert("Login Succesfull");
window.location.replace("higher_auth_dashboard.php");
return false;
}
else if (username == "Dept.head" && password == "54321") {
alert("Login Succesfull");
window.location.replace("Dept.head_dashboard.php");
return false;
}
else {
alert("Login Failed");
}
}