Program:
Output:
<html>
<body>
<form action="" method="post">
First Value: <input type="text" name="value" value="
<?php
if(isset($_POST['send']))
{
echo $_POST["value"];
}
?>"> <br />
Second Value: <input type="text" name="svalue" value="
<?php
if(isset($_POST['send']))
{
echo $_POST["svalue"];
}
?>"> <br />
<input type="submit" name="send">
</form>
</body>
</html>
<?php
if(isset($_POST["send"]))
{
$a = (int) $_POST["value"];
$b = (int) $_POST["svalue"];
var_dump($a);
echo "<br/>";
if($a > $b)
{
echo "The biggest value is $a";
}
else
{
echo "The biggest value is $b";
}
}
?>
Output:
