Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Checks if inputted details match those stored in the database
- function isValidUser() {
- var username = document.getElementById("txtUsername").value
- var password = document.getElementById("txtPassword").value
- if(username === "admin" && password === "password") {
- var result = true;
- }
- if(result) {
- //Go to enrol police web page
- window.location.href = "../EnrolPoliceOfficers/EnrolPoliceOfficers.html";
- } else {
- alert("Invalid username or password")
- }
- }
Add Comment
Please, Sign In to add comment