Ich habe ein Scriot geschrieben, welches mir einheiten z. B. von Kilo nach Mega entsprechend umrechnet. Soweit funktioniert es auch.
Allerdings wird mir bei der Einheit MEGA Kilo und Mega ausgegeben.
Falls jemand denFehler eerkennt bitt ich um Hinweise,
Testen geht hier http://morko.bplaced.net/testform.php
Danke im Voraus
Allerdings wird mir bei der Einheit MEGA Kilo und Mega ausgegeben.
PHP-Code:
<html>
<body>
<form action="testform.php" method="get">
<input maxlength="55" name="input" size="25" type="text"><p></p>
<input value="Berechnen" type="submit">
</form>
<?php
error_reporting(0);
$Zahl=$_GET["input"];
if ($Zahl >= 0.000001 AND $Zahl <=0.001)
{
$mikro= ($Zahl*1000);
echo $mikro;
echo " µ";
echo "<br";
}
if ($Zahl > 0.001 AND $Zahl <=1)
{
$Zahl1= ($Zahl*1000);
echo $Zahl1;
echo " m";
echo " <br>";
}
if ($Zahl >1 AND $Zahl <1000)
{
echo $Zahl;
echo " <br>";
}
if ($Zahl >=1000 AND $Zahl <=10000000)
{
$Kilo = ($Zahl/1000 );
echo $Kilo;
echo " K ";
echo " <br>";
}
if ($Zahl >=1000000 AND $Zahl <=1000000000)
{
$Mega = ($Kilo/1000);
echo $Mega;
echo " M ";
echo "<br>";
}
if ($Ma >=1000)
{
$Mb = ($Ma/1000);
echo $Mb;
echo " G ";
echo "<br>";
}
?>
</body>
</html>
Testen geht hier http://morko.bplaced.net/testform.php
Danke im Voraus
Kommentar