v wichtig - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of v wichtig.php
- <?php
- //Variablen
- $anrede=$_GET["anrede"];
- $name=$_GET["name"];
- $wohnort=$_GET["ort"];
- $postleitzahl=$_GET["postleitzahl"];
- $telefonnummer=$_GET["telefon"];
- $bezeichnung=$_GET["öl"];
- $menge=$_GET["menge"];
- $einzelpreis=0.45;
- $mwst=0.22;
- $euro="€";
- //Rechnungen
- $gesamtpreisnetto=$menge*$einzelpreis;
- $mehrwertsteuer=$gesamtpreisnetto*$mwst;
- $gesamtbetrag=$gesamtpreisnetto+$mehrwertsteuer;
- ?>
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="utf-8">
- </head>
- <body>
- <?php
- echo $anrede;
- echo "<br/>";
- echo "<br/>";
- echo "<br/>";
- echo $name;
- echo "<br/>";
- echo $wohnort;
- echo "<br/>";
- echo $postleitzahl;
- echo "<br/>";
- echo "<br/>";
- echo "<br/>";
- echo "<br/>";
- echo $telefonnummer;
- echo "<br/>";
- echo "<br/>";
- echo "<br/>";
- echo "<br/>";
- ?>
- <table>
- <tr>
- <td>Bezeichnung</td> <td>Menge</td> <td>Einzelpreis (netto)</td> <td>Gesamtpreis(netto)</td>
- </tr>
- <tr>
- <td>
- <?php
- echo $bezeichnung;
- ?>
- </td>
- <td>
- <?php
- echo $menge;
- ?>
- </td>
- <td>
- <?php
- echo $einzelpreis.$euro;
- ?>
- </td>
- <td>
- <?php
- echo $gesamtpreisnetto.$euro;
- ?>
- </td>
- </tr>
- <tr>
- <td></td>
- <td></td>
- <td>22% MWSt.</td>
- <td>
- <?php
- echo $mehrwertsteuer;
- ?>
- </td>
- </tr>
- <tr>
- <td></td>
- <td></td>
- <td>Gesamtbetrag</td>
- <td>
- <?php
- echo $gesamtbetrag.$euro;
- ?>
- </td>
- </tr>
- </table>
- </body>
- </html>