PHP Basics In Pictures
Perform calculations
  1. Create a new script with this code:

    <?php

    $var1 = 5;
    $var2 = 2;

    $answer = $var1 + $var2 ;

    print "$var1 plus $var2 equals $answer.";

    ?>
  2. Save the script as add.php in the PHPSCRIPTS folder.

    Here's what the relevant lines in this script do:
  1. Upload add.php to the PHPSCRIPTS directory on the Web server.