Please help me with creating a php profit calculator

Asked By 10 points N/A Posted on -
qa-featured

Please help me with creating a php profit calculator. If you have any examples of one, please do share. I am getting crazy with it already. I just need a sample where I can compare what I have done so I can see where I am going wrong.

SHARE
Answered By 5 points N/A #164106

Please help me with creating a php profit calculator

qa-featured

Dear user,

A php calculator helps you to create a simple calculator on your website. A php profit calculator helps you to buy and sell calculations for your store. It also has a table that holds the information which you can update easily. Here is a basic code to create a php calculator:

 

1) <form method="GET">
2) Total: <input type="text" name="a" <?php if (!empty($_GET['a']) echo "value='$_get['a']'"; ?>>
3) Add: <input type="text" name="b" <?php if (!empty($_GET['b']) echo "value='$_get['b']'"; ?>>
4) Minus: <input type="text" name="c" <?php if (!empty($_GET['c']) echo "value='$_get['c']'"; ?>>
5) <input type="submit" value="Calculate">
6) </form>
7) <?php if (!empty($_GET['a']) echo $_get['a']; && !empty($_GET['b']) && !empty($_GET['c'])) {
8)    $result=(int) $_GET['a']+ (int) $_GET['b'] – (int) $_GET['c'];
9)    echo 'Answer: '.$result;
10) } ?>
 
Hope this will help you.
Thank you.

Related Questions