Monday, July 15, 2019

Area of the Circle Using PHP

Here is a simple program to show how to solve the area of the circle using PHP.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com


Sample Program Output


Program Listing

area.php

<!DOCTYPE html>
<html lang="en">
<head>
<style>
body {
font-family: arial;
}
</style>
<?php
$radius=$_POST['radius'];
?>
<meta charset="UTF-8">
<title>Area of the Circle Using PHP</title>
</head>
<body>

<h2>Area of the Circle Using PHP</h2>

<h4>Created By Mr. Jake R. Pomperada</h4>
<form action="" method="post">
<b>Give Radius</b><br/><br>
<input type="text" name="radius" value="<?php echo $radius; ?>" ><br/><br>
<input type="submit" name="submit" value="Submit">
</form>
<br>
<?php
if(isset($_POST['submit'])){
//area = pie * radius * radius
define('PI','3.14');
$radius=$_POST['radius'];
$area= PI * $radius * $radius;
echo "Area of the Circle is ".round($area,2);
}
?>
</body>
</html>


No comments:

Post a Comment