boxxertrumps
11-30-2006, 10:03 PM
I am creating a Quadratic equation script, and i have this so far..
<?php
$a = $_GET["a"];
$b = $_GET["b"];
$c = $_GET["c"];
$negb = -$b;
$2a = 2 * $a;
$square = sqrt(pow($b,2) -4 * $a * $c);
if is_nan($square) == 1 {echo(No Roots!)};
else {
$add = $negb + $square;
$sub = $negb - $square;
$x1 = $add / $2a;
$x2 = $sub / $2a;
echo($x1 ."<br />". $x2)};
?>
i hope noone got hurt... please excuse my overuse of variables...
and im also trying to figure out how to create a guest page on my site... IE bulliten board where people can write what they want, delete what they want, etc. but with less restrictions.
all i need to do is figure out how to change <> into ampersand characters and back when posting, then dump the written junk into a php file.
<?php
$a = $_GET["a"];
$b = $_GET["b"];
$c = $_GET["c"];
$negb = -$b;
$2a = 2 * $a;
$square = sqrt(pow($b,2) -4 * $a * $c);
if is_nan($square) == 1 {echo(No Roots!)};
else {
$add = $negb + $square;
$sub = $negb - $square;
$x1 = $add / $2a;
$x2 = $sub / $2a;
echo($x1 ."<br />". $x2)};
?>
i hope noone got hurt... please excuse my overuse of variables...
and im also trying to figure out how to create a guest page on my site... IE bulliten board where people can write what they want, delete what they want, etc. but with less restrictions.
all i need to do is figure out how to change <> into ampersand characters and back when posting, then dump the written junk into a php file.