ragazzi ho un if che mi fa morire...

con il seguente errore

Notice: Undefined index: chk in S:\Edo\***\***.php on line 9

il codice è..



<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<script language = "PHP" >
$chk = $_POST["chk"];
</script>
<script language = "PHP" >

if ( ($chk == '1') )
{
$nome1 = $_POST["nome"];
$cognome1 = $_POST["cognome"];
if ( ($nome1 == 'a' ) && ($cognome1 == 'a') )
{
print("$nome1\n");
print ("$cognome1");
}
else
{
print("Password Errata");
}
}

</script>
<form name="form1" method="post" action="prova.php">
<table width="155" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="29">
<input type="text" name="nome">
<font color="#FFFFFF"></font> </td>
</tr>
<tr>
<td><input type="text" name="cognome">
</td>
</tr>
<tr><input type="hidden" name="chk" value= "1">
<td><input type="submit" name="Submit" value="Invia">
</td>
</tr>
</table>
</form>

</body>
</html> :maLOL: :maLOL: :maLOL: :maLOL: :maLOL: :maLOL: