Advertisement
Guest User

kirikou php kiwi

a guest
Oct 2nd, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Impot</title>
  5. <meta charset="utf-8" />
  6. </head>
  7.  
  8. <body>
  9. <?php
  10. include "library.php";
  11.  
  12. if((!isset($_POST["nom"]) and $_POST["nom"] != "")
  13. or (!isset($_POST["revenu"]) and $_POST["revenu"] != "")
  14. or (!isset($_POST["civilite"]) and $_POST["civilite"] != "")){
  15.  
  16. ?>
  17.  
  18. <form method="post" action="impot.php">
  19. <insput type = "radio" name = "civilite" />Monsieur<insput type = "radio" name = "civilite" />Madame
  20. <input type = "text" placeholder = "Saisir nom" required name = "nom" />
  21. <input type = "text" placeholder = "Saisir revenu" required name = "revenu" />
  22. <input type = "submit" value = "Calculez !" />
  23. </form>
  24.  
  25. <?php
  26. }
  27.  
  28. else{
  29.  
  30. $civilite = $_POST["civilite"];
  31. $nom = $_POST["nom"];
  32. $revenu = $_POST["revenu"];
  33.  
  34. $imp = new Impot($nom, $revenu);
  35.  
  36. echo $civilite . " " . $imp->;
  37. }
  38.  
  39. ?>
  40. </body>
  41. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement