<?php
if(isset($_REQUEST["btnSubmit"])){
$name=$_REQUEST["txtName"];
$age=$_REQUEST["txtAge"];
echo "Hi, ".$name.". Your age is ".$age;
}
?>
<form action="#" method="post">
<div>Name<br/>
<input type="text" name="txtName" />
</div>
<div>Age<br/>
<input type="text" name="txtAge" />
</div>
<div>
<input type="submit" value="Submit" name="btnSubmit" />
</div>
</form>
Comments 0