My program is not working please tell me the problum in it...
<form action = "http://localhost/third/c2.php" method = "Post">
<pre>
<input type = 'checkbox' value = 'Stipned' name = 'chk1'/> stipend </br>
<input type = 'checkbox' value = 'Diciplane' name = 'chk2'/> Diciplane </br>
<input type = 'checkbox' value = 'Attandance' name = 'chk3'/> Attandance </br>
<input type = 'checkbox' value = 'Assignment' name = 'chk4'/> Assignment </br>
<input type = 'checkbox' value = 'Agree' name = 'chk5'/> Agree </br>
<input type = "submit" value = 'Go'/>
</pre>
</form>
and the php file is
<?php
if(isset($_POST['chk5'] && ($_POST['chk5']!==Agree)){
echo "sorry you are failed to be selected";
}
else {
$i=1;
while(isset($_POST['chk&$i']))
if($_POST['chk&$i']==checked $$ $i<=3 ){
echo $_POST['chk&$i']. "</br>";
}
$i++;
}
}
?>