Hér er smá login kerfi sem ég gerði fyrir nokkuð löngu síðan það sækir bara í password en virkar engu að síður

//index.php byrjar 
<html> 
<head> 
</head> 
<body> 
<form name="form1" method="post" action="code.php"> 
  <p>Password:  
    <input name="passwd" type="password" id="passwd"> 
</p> 
  <p> 
    <input type="submit" name="Submit" value="Sta&eth;festa"> 
</p> 
</form> 
</body> 
</html> 
//index.php endar 
//code.php byrjar 
<html> 
<head> 
</head> 
<body> 
<?php 
$passwd = $_POST['passwd']; 
if ($passwd == breytamer) 
{ 
include ('rett.php'); 
} 
else if ($passwd == breytamer2) 
{ 
include ('rett.php'); 
} 
else 
{ 
include ('villa.php'); 
} 
?>  
</body> 
</html> 
//code.php endar 
//rett.php byrjar 
<html> 
<head> 
</head> 
<body><?php 
if(!isset($_POST["passwd"]) || empty($_POST["passwd"])) { die("Þú hefur ekki leyfi til að vera hér"); } 
print "Þetta vefsvæði er í vinnslu" 
?> 
</body> 
</html> 
//rett.php endar