Jump to content

[SOLVED] (Noob question) What next? (Circumference?)


Roy766

Recommended Posts

Um....I have no idea what to do....I want this program to figure out the circumference by inputing a diamter value in a box and getting an answer output. But what do I do now?

 

    <form>
    <input type="text" name="diameter"><br>
    <input type="submit" name="submit" value="Calculate!">
    </form><br>
    <?php
      $circumference = $_REQUEST['diameter'] * 3.14
      echo 'Circumference is '$circumference
    ?>

either

<?php
      $circumference = $_REQUEST['diameter'] * 3.14;
      echo 'Circumference is ' . $circumference;
?>

or

<?php
      $circumference = $_REQUEST['diameter'] * 3.14;
      echo 'Circumference is ' , $circumference;
?>

or

<?php
      $circumference = $_REQUEST['diameter'] * 3.14;
      echo "Circumference is $circumference";
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.