Need some help with a simple php code. When I try to access http://example.com/login.php, it gives me a warning "Notice: Undefined index: type in www.example.com on line 2". But, when Try to access http://example.com/login.php?type=InvalidLogin, everything works fine. Whats wrong in my code.
My Code:
<?
$type = $_REQUEST["type"];
if ($type == 'InvalidLogin') {
?>
Your login is invalid.
<?
} else {
?>
Your login is valid
<?
}
?>