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.



Your result can be seen below.

Result of php executing





Full code of v wichtig.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 "<br/>";
  28.         echo "<br/>";
  29.         echo "<br/>";
  30.         echo $name;
  31.         echo "<br/>";
  32.         echo $wohnort;
  33.         echo "<br/>";
  34.         echo $postleitzahl;
  35.         echo "<br/>";
  36.         echo "<br/>";
  37.         echo "<br/>";
  38.         echo "<br/>";
  39.         echo $telefonnummer;
  40.         echo "<br/>";
  41.         echo "<br/>";
  42.         echo "<br/>";
  43.         echo "<br/>";
  44.     ?>
  45.     <table>
  46.         <tr>
  47.             <td>Bezeichnung</td> <td>Menge</td> <td>Einzelpreis (netto)</td> <td>Gesamtpreis(netto)</td>
  48.         </tr>
  49.         <tr>
  50.             <td>
  51.             <?php 
  52.                 echo $bezeichnung;
  53.             ?>
  54.             </td>
  55.             <td>
  56.             <?php
  57.                 echo $menge;
  58.             ?>
  59.             </td>
  60.             <td>
  61.             <?php
  62.                 echo $einzelpreis.$euro;
  63.             ?>
  64.             </td>
  65.             <td>
  66.             <?php 
  67.                 echo $gesamtpreisnetto.$euro;
  68.             ?>
  69.             </td>
  70.         </tr>
  71.         <tr>
  72.             <td></td>
  73.             <td></td>
  74.             <td>22% MWSt.</td>
  75.             <td>
  76.             <?php
  77.                 echo $mehrwertsteuer;
  78.             ?>
  79.             </td>
  80.         </tr>
  81.         <tr>
  82.             <td></td>
  83.             <td></td>
  84.             <td>Gesamtbetrag</td>
  85.             <td>
  86.             <?php
  87.                 echo $gesamtbetrag.$euro;
  88.             ?>
  89.             </td>
  90.         </tr>
  91.     </table>
  92. </body>
  93. </html>
File Description
  • v wichtig
  • PHP Code
  • 17 Nov-2019
  • 1.95 Kb
You can Share it: