I am a newbie to php. I am simply trying to validate input from a login page. However I am always getting a positive boolean value when username is entered or not. Following is my code for the login page;
<form method = "post" action = "entering.php">
LOGIN <br />
<br />
User Name: <input type = "text" size = "10" id = "username" name = "username" /><br /><br />
Password: <input type = "password" size = "10" id = "password" name = "password"/><br />
<br />
<br />
<input type = "submit" value = "Submit" />   <input type = "reset" />
</form>
</body>
</html>
Following the code for my action php page ie. entering.php
<?php
If (isset($_POST['username']))
{
echo "Username Entered"."<br />";
}
Else
{
echo "Username Not entered"."<br />";
}
?>
And I always get the message "Username Entered" even if the username is not entered.
Can any one help?