Rechnung Ausgabe - 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.



Your result can be seen below.

Result of php executing





Full code of Rechnung Ausgabe.php

  1. <?php 
  2. //Variablen
  3.     $anrede = $_GET ["anrede"];
  4.     $name = $_GET ["name"];
  5.     $wohnort = $_GET ["ort"];
  6.     $postleitzahl = $_GET ["postleitzahl"];
  7.     $telefonnummer = $_GET ["telefon"];
  8.     $bezeichnung = $_GET ["öl"];
  9.     $menge = $_GET ["menge"];
  10.     $einzelpreis = 0.45;
  11.     $mwst = 0.22;
  12.     $euro = "€";
  13. //Rechnungen
  14.     $gesamtpreisnetto = $menge*$einzelpreis;
  15.     $mehrwertsteuer = $gesamtpreisnetto*$mwst;
  16.     $gesamtbetrag = $gesamtpreisnetto+$mehrwertsteuer;
  17. ?>
  18.  
  19. <!DOCTYPE HTML>
  20. <html>
  21. <head>
  22.     <meta charset="utf-8">
  23. </head>
  24. <body>
  25.     <?php 
  26.         echo $anrede;
  27.         echo $name;
  28.     ?>
  29.     <table>
  30.         <tr></tr>
  31.         <tr>
  32.             <td>
  33.             <?php 
  34.                 echo $bezeichnung;
  35.             ?>
  36.             </td>
  37.             <td>
  38.             <?php
  39.                 echo $menge;
  40.             ?>
  41.             </td>
  42.             <td>
  43.             <?php
  44.                 echo $einzelpreis.$euro;
  45.             ?>
  46.             </td>
  47.             <td>
  48.             <?php 
  49.                 echo $gesamtpreisnetto.$euro;
  50.             ?>
  51.             </td>
  52.         </tr>
  53.         <tr>
  54.             <td></td>
  55.             <td></td>
  56.             <td>22% MWSt.</td>
  57.             <td>
  58.             <?php
  59.                 echo $mehrwertsteuer;
  60.             ?>
  61.             </td>
  62.         </tr>
  63.         <tr>
  64.             <td></td>
  65.             <td></td>
  66.             <td>Gesamtbetrag</td>
  67.             <td>
  68.             <?php
  69.                 echo $gesamtbetrag.$euro;
  70.             ?>
  71.             </td>
  72.         </tr>
  73.     </table>
  74. </body>
  75. </html>
File Description
  • Rechnung Ausgabe
  • PHP Code
  • 17 Nov-2019
  • 1.51 Kb
You can Share it: