PHP Classes

File: Root66Implementation.php

Recommend this page to a friend!
  Classes of Lance Otis   Root66   Root66Implementation.php   Download  
File: Root66Implementation.php
Role: Example script
Content type: text/plain
Description: Demo implements the class
Class: Root66
Calculate the square, cube, and 5th roots
Author: By
Last change: added 5th root
Date: 9 months ago
Size: 1,776 bytes


Class file image Download

 * @author Lance Otis
 * @copyright 2023
 * Verion 2 2/15/2023

//Root Approximation
include ("classRoot66.php");


<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
table, th, td {
  border: 1px solid black;
  padding: 8px;


<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"/> &nbsp;
<input type="submit" name="submit" value="Calc"/> &nbsp;
<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 &nbsp; &nbsp; &nbsp; &nbsp;
<label class="radio-inline">
 <input type="radio" id="Cube" name = "root" value="3" >Cube Root &nbsp; &nbsp; &nbsp; &nbsp;
<label class="radio-inline">
 <input type="radio" id="5th" name = "root" value="5" >5th Root
<br />
Numbers < 999999999999
<br />


if (isset($_POST['submit'])) {

'<div style="background-color: beige; margin-left: 8px; margin-top: -20px; height: 120px; ">';
$number = ($_POST['number']);
$rootExponent = ($_POST['root']);
$root = new Root66($number, $rootExponent);

} else
" Enter Number Above ";}