Not Working Form

<!DOCTYPE html>
<html lang = "tr">
<head>
<title>
Minecraft Sitesi | Anasayfa
</title>
</head>
<body>
<script type="text/javascript">
function adminlogin(loggedusername,loggedpassword){
if (adminloginform.username == admininfo.name && adminloginform.loggedpassword == admininfo.password){
alert ("You are admin")
	}
	else {
	alert("You are not admin")
	}
};

var admininfo = {
name : "admin",
password : "admin"
};
</script>
<form id = "adminloginform" method="post" >
<input type = "text" name = "username">
<input type = "password" name = "loggedpassword">
<input type = "button" onclick = "adminlogin(username,loggedpassword)" value = "Login">
</form>
</body>
</html>

Welcome to the forums, @sonportal1.

Can you explain the problem more clearly, please?

1 Like

Currently you are comparing the username and password with the form fields.
Instead of that, you need to compare with the value of the form fields.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.