<?php
/**
* @author Lance Otis
* @copyright 2023
* Verion 2 2/15/2023
*/
//Root Approximation
include ("classRoot66.php");
?>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<style>
table, th, td {
border: 1px solid black;
padding: 8px;
}
</style>
</head>
<body>
<div style="background-color: beige; margin-left: 8px; width: 544px; height: 448px; border: 2px solid black; padding: 8px;" >
<form id="getInfo" method="post" target="_self">
Enter Number to get Root:
<input type="text" name="number" id="number"/>
<input type="submit" name="submit" value="Calc"/>
<input type="reset" name="reset" value="Reset"/> Ver:2.0<br/>
<div class="container">
<br />
<label class="radio-inline">
<input type="radio" id="Square" name="root" value="2" checked>Square Root
</lable>
<label class="radio-inline">
<input type="radio" id="Cube" name = "root" value="3" >Cube Root
</lable>
<label class="radio-inline">
<input type="radio" id="5th" name = "root" value="5" >5th Root
</lable>
</div>
<br />
Numbers < 999999999999
</form>
<br />
<?php
if (isset($_POST['submit'])) {
echo '<div style="background-color: beige; margin-left: 8px; margin-top: -20px; height: 120px; ">';
$number = ($_POST['number']);
$rootExponent = ($_POST['root']);
$root = new Root66($number, $rootExponent);
$root->getRoot();
echo "</div><pre>";
print_r($root->getRootArray());
echo "</pre>";
} else
{echo " Enter Number Above ";}
?>
</div>
</body>
</html>
|