Ich poste jetzt mal das ganze script. Jedoch ist das was mich wirklich Interesiert:P Warum er die IF Anweisung nicht annimmt? Würde mich sehr über Hilfe freun
Das ganze soll ein einfacher Umrechner für Zahlensysteme sein
THX für jede Hilfe
MfG
eMino
PHP-Code:
if ($_GET ["berechnen"])
{
$value_dezimal = $_GET ["dezimal"];
$value_binaer = decbin ($_GET ["dezimal"]);
$value_oktal = decoct ($_GET ["dezimal"]);
$value_hexa = dechex ($_GET ["dezimal"]);
}
elseif ($_GET ["berechnen"])
{
$value_dezimal = bindec ($_GET ["binaer"]);
$value_binaer = $_GET ["binaer"];
$value_oktal = decoct (bindec ($_GET ["binaer"]));
$value_hexa = bindec (dechex ($_GET ["binaer"]));
}
elseif ($_GET ["berechnen"])
{
$value_dezimal = octdec ($_GET ["oktal"]);
$value_binaer = octdec (decbin ($_GET ["oktal"]));
$value_oktal = $_GET ["oktal"];
$value_hexa = octdec (dechex ($_GET ["oktal"]));
}
elseif ($_GET ["berechnen"])
{
$value_dezimal = hexdec ($_GET ["hexa"]);
$value_binaer = hexdec (decbin ($_GET ["hexa"]));
$value_oktal = hexdec (decoct ($_GET ["hexa"]));
$value_hexa = $_GET ["hexa"];
}
$name ="formular";
$action = $PHP_SELF ;
$method ="get";
$target ="";
echo formular_beginn ($name, $action, $method, $targe);
$name ="dezimal";
$maxlength ="20";
$size ="15";
$value_dezimal = $_GET ["dezimal"];
$extra_html = "";
$readonly ="";
echo "Dezimal:";
echo textfeld_einzeilig ($name, $maxlength, $size, $value_dezimal , $extra_html , $readonly );
$name ="binaer";
$maxlength ="20";
$size ="15";
$value_binaer = $_GET ["binaer"];
$extra_html = "";
$readonly ="";
echo "Binaer:";
echo textfeld_einzeilig ($name, $maxlength, $size, $value_binaer , $extra_html , $readonly );
$name ="oktal";
$maxlength ="20";
$size ="15";
$value_oktal = $_GET ["oktal"];
$extra_html = "";
$readonly ="";
echo "Oktal:";
echo textfeld_einzeilig ($name, $maxlength, $size, $value_oktal , $extra_html , $readonly );
$name ="hexa";
$maxlength ="20";
$size ="15";
$value_hexa = $_GET ["hexa"];
$extra_html = "";
$readonly ="";
echo "Hexa:";
echo textfeld_einzeilig ($name, $maxlength, $size, $value_hexa , $extra_html , $readonly );
echo "<br>";
$name="berechnen";
$type="submit";
$text="";
$extra_html="";
$value="berechnen" ;
echo klickbutton ($name, $type, $text, $extra_html,$value);
$name="reset";
$type="reset";
$text="";
$extra_html="";
$value="reset" ;
echo klickbutton ($name, $type, $text, $extra_html, $value);
echo formular_ende ();
THX für jede Hilfe
MfG
eMino
Kommentar