Advertisement
Guest User

kuku

a guest
Oct 5th, 2015
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="pl">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <title> formularz </title>
  6. <style type="text/css">
  7.  
  8. body {background-color:lightgray}
  9. #tabela {
  10. border: 1px solid black;
  11. border-collapse: collapse;
  12. background-color: #EEEEEE;
  13. algin:center;
  14. }
  15. #cus{
  16.  
  17. border: 1px solid black;
  18. border-collapse: collapse;
  19. }
  20.  
  21.  
  22.  
  23.  
  24. </style>
  25. </head>
  26.  
  27. <body>
  28. <h1 > Zamówienie </h1>
  29.  
  30. <form action="po.php" method="post">
  31. Imię:
  32. <input type="text" name="imie" /> </br>
  33. Nazwisko:
  34. <input type="text" name="nazwisko" /> </br>
  35. Adres zamieszkania:
  36. <input type="text" name="adres" /> </br>
  37.  
  38.  
  39.  
  40. <table id="tabela" align="center">
  41. <tr id"cus">
  42. <th scope="col" name="zamowienie"> Zamówienie </th>
  43. <th scope="col"> Cena za sztukę(PLN.szt) </th>
  44. <th scope="col"> Ilość </th>
  45. </tr>
  46. <tr>
  47. <th scope="row" > Ceremonia Ślubna </th>
  48. <th scope="row"> 600 zł</th>
  49. <th scope="row"> <input type="text" name="cerem"/> </th>
  50.  
  51. </tr>
  52. <tr>
  53. <th scope="row"> Błogosławieństwo </th>
  54. <th scope="row"> 300,50 zł </th>
  55. <th scope="row"> <input type="text" name="blog" /> </th>
  56. </tr>
  57. <tr>
  58.  
  59.  
  60. <th scope="row"> Płyta </th>
  61. <th scope="row"> 2 zł </th>
  62. <th scope="row"> <input type="text" name="ply" /> </th>
  63. </tr>
  64. <tr>
  65. <th scope="row"> Opakowanie </th>
  66. <th scope="row"> 4,20 zł </th>
  67. <th scope="row"> <input type="text" name="opa" /> <align="center" </th>
  68. </tr>
  69. <tr>
  70. <th scope="row"> Album </th>
  71. <th scope="row"> 80 zł</th>
  72. <th scope="row"> <input type="text" name="alb"/> </th>
  73. </table>
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83. <input type="submit" value="Wyślij zamówienie" align="right" />
  84.  
  85.  
  86.  
  87.  
  88. </form>
  89.  
  90. <?php
  91.  
  92.  
  93.  
  94.  
  95. $imie=$_POST['imie'] ;
  96. $nazwisko=$_POST['nazwisko'] ;
  97. $adres=$_POST['adres'] ;
  98.  
  99. $vat= 0.23 ;
  100. $koszt1=600;
  101. $koszt2=300.50;
  102. $koszt3=2 ;
  103. $koszt4=4.20;
  104. $koszt5=80;
  105.  
  106.  
  107. $cerem=$_POST['cerem'];
  108. $blog =$_POST['blog'];
  109. $ply=$_POST['ply'];
  110. $opa=$_POST['opa'];
  111. $alb =$_POST['alb'];
  112.  
  113. $netto1= $koszt1* $cerem * $vat;
  114. $netto2=$koszt2 *$blog * $vat ;
  115. $netto3=$koszt3*$ply*$vat ;
  116. $netto4= $koszt4 *$opa*$vat;
  117. $netto5=$koszt5*$vat ;
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124. echo "<h3> Zamawiający: $imie $nazwisko<h3> " ;
  125. echo "<h3> Adres zamieszkania: $adres <h3> " ;
  126.  
  127.  
  128. echo<<<END
  129.  
  130.  
  131. <h2> Podsumowanie zamówienia <h2>
  132.  
  133.  
  134. <table border="1" cellpadding="10" cellspacing="0 ">
  135.  
  136. <tr>
  137. <td>Podmiot</td><td>Ilość</td><td>Wartość netto</td> <td>Wartość Brutto</td>
  138. </tr>
  139.  
  140.  
  141. <tr>
  142. <td>Ceremonia Ślubna</td><td>$cerem</td> <td>(round($netto1 , 2)) </td><td>jhjhjh </td>
  143. </tr>
  144. <tr>
  145. <td>Błogosławieństwo </td><td>$blog</td>
  146. </tr>
  147. </tr>
  148.  
  149.  
  150.  
  151. <tr>
  152. <td>Płyta</td><td>$ply</td>
  153. </tr>
  154. <tr>
  155. <td>Opakowanie</td>$opa<td></td>
  156. </tr>
  157. </tr>
  158.  
  159. </tr>
  160. </tr>
  161.  
  162. <tr>
  163. <td>Album</td><td>$alb</td>
  164. </tr>
  165. <tr>
  166. <td>SUMA</td><td></td>
  167. </tr>
  168. </tr>
  169.  
  170. </tr>
  171.  
  172.  
  173.  
  174.  
  175. END;
  176.  
  177. ?>
  178.  
  179.  
  180.  
  181.  
  182.  
  183. </body>
  184. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement