-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform.php
More file actions
27 lines (25 loc) · 758 Bytes
/
form.php
File metadata and controls
27 lines (25 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<form action="form.php" method="post">
<p>Artikel: <input type="text" name="artikel" /></p>
<p>Menge: <input type="text" name="menge" /></p>
<p>Preis: <input type="text" name="preis" /></p>
<p><input type="submit" name="button" value="Bestellen"/></p>
<p><input type="reset" name="button" value="Abbrechen"/></p>
</form>
<?php
if(isset($_POST["artikel"])){
echo 'Folgender Artikel wird bestellt:';
echo $_POST["artikel"];
echo '<br>Folgende Menge wird bestellt:';
echo $_POST["menge"];
echo '<br>Folgender Artikelpreis:';
echo $_POST["preis"];
echo '<br>Gesamtpreis:';
echo $_POST["preis"]*$_POST["menge"];
}
echo '<br><br><br>';
echo '<input type="text" name="artikel" value="';
if (isset($_POST['artikel'])){
echo $_POST['artikel'];
}
echo '">';
?>