Hallo,
ich beschäftige mich jetzt ein wenig mit php.
ich habe ein Formular erstellt, in dem zwei zahlen an ein
php - Programm gesendet werden sollten. Aber er berechnet sie nicht
bzw. bekommt keine daten vom Formular.
Hier meine Quelltexte:
Formular
HTML-Code:<html> <head> <title> PHP-TINPUT </title> </head> <body> <form action="https://127.0.0.1/Neuer%20Ordner/Ausgabe.php" methode="get"> zahl1: <input type="text" name"zahl 1"> <br> zahl2: <input type="text" name"zahl 2"> <br> <input type="submit" value="Berechnen"> <input type="reset" value="Eingabe Löschen"> </form> </body> </html>Ich finde hier einfach keine Fehler.PHP-Code:<html>
<head>
<title>
Programmieren mit PHP
</title>
</head>
<body>
<?php
$zahl1 = $HTTP_GET_VARS ["zahl 1"];
$zahl2 = $HTTP_GET_VARS ["zahl 2"];
$Summe = $zahl1 + $zahl2;
echo "Summe: $Summe";
?>
Der Browser zeit an, dass in Zeile 10 und 11 Fehler sind.
Das sind diese Zeilen:
PHP-Code:$zahl1 = $HTTP_GET_VARS ["zahl 1"];
$zahl2 = $HTTP_GET_VARS ["zahl 2"];



Zitieren