[Solved] PHP simple Calculator problems [closed]


Try this:

    <?php
$valuea = (int)$_POST['valuea'];
$valueb = (int)$_POST['valueb'];
$answer = $valuea + $valueb ;
 if ($answer > 84){
       echo "You meet the requirements for the rule of 85";
 }else{
       echo "You do not meet the rule of 85";
}
?>
<form method='post' action='/make-a-website/online-calculator'>
    <table border="0" width="500px" cellpadding='3' cellspacing='1' class="table">
        <tr class="calcheading">
            <td colspan="2"><strong>Rule of 85 calculator </strong></td>
        </tr>
        <tr class="calcrow">
            <td>Enter your years of work:</td>
            <td align="center"><input type="text" name="valuea" value="<?php echo $valuea; ?>" /></td>
        </tr>
        <tr class="calcrow2">
            <td>Enter your age:</td>
            <td align="center"><input type="text" name="valueb" value="<?php echo $valueb; ?>" /></td>
        </tr>
        <tr class="submit"><td colspan="2"><input type="submit" value="Calculate"/></td></tr>
        <tr class="calcrow">
            <td><i>The answer is:</td>
            <td align="center"><input type="text" value="<?php echo $answer; ?>"></td>
        </tr>
    </table>
</form> 

2

solved PHP simple Calculator problems [closed]