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 ?> Link to comment https://forums.phpfreaks.com/topic/102400-solved-noob-question-what-next-circumference/ 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"; ?> Link to comment https://forums.phpfreaks.com/topic/102400-solved-noob-question-what-next-circumference/#findComment-524381 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! Link to comment https://forums.phpfreaks.com/topic/102400-solved-noob-question-what-next-circumference/#findComment-524398 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.