When I use the GET method in php program.. I face the error as Notice:
Undefined index: name in /opt/lampp/htdocs/aj/getmethod.php on line 2
The error is shown on line 2, name and age.
<?php
if($_GET["name"]||$_GET["age"])
{
echo "welcome ".$_GET["name"]."<br/>";
echo "You are ".$_GET["age"]."Years old";
}
?>
<html>
<body>
<form action="<?php $_PHP_SELF ?>" method="GET">
Name : <input type="text" name="name"/>
Age : <input type="text" name="age"/>
<input type="submit" />
</form>
</body>
</html>