weblogin1/login.php
knyiharrolandjanos b76a3ca304 commit
2023-01-27 11:36:25 +01:00

66 lines
1.9 KiB
PHP

<html>
<head>
<title>Bejelentkezés</title>
<link rel = "stylesheet" type = "text/css" href = "style.css">
<style>body{
background: #eee;
}
#frm{
border: solid gray 1px;
width:25%;
border-radius: 2px;
margin: 120px auto;
background: white;
padding: 50px;
}
#btn{
color: #fff;
background: #337ab7;
padding: 7px;
margin-left: 70%;
} </style>
</head>
<body>
<div id = "frm">
<h1>Bejelentkezés</h1>
<form name="f1" action = "authentication.php" onsubmit = "return validacio()" method = "POST">
<p>
<label> Felhasználónév: </label>
<input type = "text" id ="nev" name = "nev" />
</p>
<p>
<label> Jelszó: </label>
<input type = "password" id ="pass" name = "pass" />
</p>
<p>
<input type = "submit" id = "btn" value = "Bejelentkezés" />
</p>
</form>
</div>
<script>
function validacio()
{
var id=document.f1.user.value;
var ps=document.f1.pass.value;
if(id.length=="" && ps.length=="") {
alert("A Felhasználó név és jelszó mező nem lehet üres!");
return false;
}
else
{
if(id.length=="") {
alert("A Felhasználó név mező nem lehet üres!");
return false;
}
if (ps.length=="") {
alert("A jelszó mező nem lehet üres!");
return false;
}
}
}
</script>
</body>
</html>