allora ho risolto tutti gli errori tranne uno o meglio che mi fa la radice quadrata anche quando il numero non è intero quindi non mi funziona
Codice PHP:
if(is_numeric($d)){
 
$result1=(-$bsqrt($d))/2*$a
$result2=(-$bsqrt($d))/2*$a;} 
else{
 
$result1=(-$b$d)/2*$a;
 
$result2=(-$b$d)/2*$a; } 
riposto il codice modificato
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//IT"> 
<html>
 <head> 
<title></title>
 </head>
 <body>
 

metti qui l' equazione di forma base</p> 
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
 

X^2 <input type="text" name="x2" value="metti qui il numero senza x"></p>
 

X <input type="text" name="x" value="metti qui il numero senza x"></p> 


termine noto <input type="text" name="termine_noto" value="metti qui il numero"></p> 

<input type="submit" name="submit" value="Invia"/></p> 
</br> 
<?php if(isset($_POST['submit'])){
 $a=$_POST['x2'];
 $b=$_POST['x'];
 $c=$_POST['termine_noto']; 
$d= pow($b,2)-4*$a*$c;
 $e="radice"; 
$risultati= "I risultati sono: "; 
if(is_numeric($d)){
 $result1=(-$b+ sqrt($d))/2*$a; 
$result2=(-$b- sqrt($d))/2*$a;} 
else{
 $result1=(-$b+ $e.$d)/2*$a; 
$result2=(-$b- $e.$d)/2*$a;} 
if($d>0)
{ echo "$risultati"; 
echo "$result1";
 echo "$result2";
 echo"

soluzioni reali</p>"; } 
elseif($d==0)
{ echo "$risultati"; 
echo "$result1";
 echo "$result2"; 
echo"

soluzioni coincidenti</p>";} 
else {echo "impossibile";} 
}
 ?> 
</body> 
</html>