+ =





CODE


<?php
$foo = $_POST['foo'];
$bar = $_POST['bar'];
if ($foo AND $bar)
{
$answer = $foo + $bar;
}

?>
<form method="post" action="thispage.php">
<input type="text" value="<?php
print $foo;
?>" name="foo">
+
<input type="text" value="<?php
print $bar;
?>" name="bar">
=
<input type="text" name="answer" value="<?php
print $answer;
?>">
<br><br>

<input type="submit" value="Add them!">
</form>
<?php

exit;