hi im still a beginner in PHP and this is the code i have so far and it only calculates value of two numbers put in manually. I want to generate two numbers and add the values.
<form name="form1" method="post" action="">
value1:
<label>
<input type="text" name="value1">
</label>
<p> </p>
<p>
<label>
value2:
<input type="text" name="value2">
</label>
</p>
<p>
<label>
<input type="submit" name="submit" value="calculate">
</label>
</form>
<?php
$_POST[calculate] =="add"; {
$result = $_POST[value1] + $_POST[value2];
}
echo $result;
?>