Advertisement
tei123

phphp

Dec 2nd, 2016
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. <html>
  2. <body>
  3. <?php
  4.  
  5. $a=$_GET['nazwa'];
  6. $b=$_GET['data'];
  7. $c=$_GET['cena'];
  8. $d=$_GET['ilosc'];
  9.  
  10. $date1=date_create($b);
  11. $date2=date_create("2016-12-02");
  12.  
  13.  
  14. $diff=date_diff($date1,$date2);
  15. echo $diff->format('%a dni');
  16.  
  17. echo "cena calosci to ".$d*$c."<br>";
  18.  
  19.  
  20.  
  21. ?>
  22. </body>
  23. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement