Roy766 Posted April 22, 2008 Share Posted April 22, 2008 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 ?> Quote Link to comment Share on other sites More sharing options...
Barand Posted April 22, 2008 Share Posted April 22, 2008 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"; ?> Quote Link to comment Share on other sites More sharing options...
Roy766 Posted April 22, 2008 Author Share Posted April 22, 2008 THANK YOU!!! Well, now I shouldn't have any problem with longer formulas! Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.