How do i improve this simple maths php script?

Hi, just started learning some php and i made this
http://sgmarketwatch.com/test1.php

1.) How do i make the webpage faster or calculate the value quickly ? i use the POST method maybe i should use something else ?

2.) How do i get rid of the error msg that appears when you first load it?

3.) How do i evolve it into the screenshot that is being attached ? i dont know what method to use, i figure something like a for loop but i am not sure what to include in its parameter. Particularly interested in the display of table rows

Just started learning php by borrowing library books and watching video tutorial
Thanks for the guidance

Sorry, forget to include this

How do i retain the value of what is being keyed in ?

so that the user do not have to keep typing it again and again

Thanks

Save the values in session array.

Get rid of the error by setting a default value on the line specified.
I don’t understand question part 3.