Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="pl">
  3. <head>
  4. <meta charset="UTF-8"/>
  5. <style type="text/css">
  6. form {
  7. color: rgb(47,70,47);
  8. background: rgb(228,237,228);
  9. border: black 2px solid;
  10. width: 500px;
  11. padding: 10px;
  12. }
  13. table {
  14.  
  15. border-collapse:collapse;
  16. border:solid 1px black;
  17. margin:auto;
  18. }
  19.  
  20. td {
  21. border:solid 1px black;
  22. padding:5px;
  23. }
  24.  
  25. </style>
  26. </head>
  27. <body>
  28. <form action="bilety.php" method="post">
  29.  
  30. <table border="1">
  31. <tr><td>Imie:</td><td> <input type="text" name="imie" /></td></tr>
  32. <tr><td>Nazwisko:</td><td> <input type="text" name="nazwisko" /></td></tr>
  33. <tr><td>wiek:</td><td> <input type="text" name="wiek" /></td></tr>
  34. <tr><td colspan="2">Płeć</td></tr>
  35. <tr><td> Mężczyzna <input type="radio" name="plec" value="M"> </td></tr>
  36. <tr><td> Kobieta <input type="radio" name="plec" value="K"> </td></tr>
  37. </tr>
  38. <tr><td> <textarea name="opinia" cols="3" rows="3" </td></tr>
  39. <td>Wyślij:</td>
  40. <td><input type="submit" name="wyslij"/></td>
  41. </tr>
  42. <tr>
  43. <td>Reset:</td>
  44. <td><input type="reset" name="reset"/></td>
  45. </tr>
  46. </table>
  47. </form>
  48. <?php
  49. if (isset ($_POST ["wyslij"]))
  50. {
  51. if (empty ($_POST["imie"]) || (empty ($_POST["nazwisko"]) || (empty($_POST["wiek"]))))
  52. {
  53. print "Wprowadź dane";
  54. }
  55. elseif (empty ($_POST["plec"]))
  56. {
  57. print "Podaj Płeć";
  58. }
  59. else
  60. {
  61. $imie=$_POST['imie'];
  62. $nazwisko=$_POST['nazwisko'];
  63. $wiek=$_POST['wiek'];
  64. $plec=$_POST['plec'];
  65. $opinia=$_POST['opinia'];
  66. print("Imię: ".$imie. "<br/>");
  67. print("Nazwiko: ".$nazwisko. "<br/>");
  68. print("Wiek: ".$wiek. "<br/>");
  69. print("Plec: ".$plec. "<br/>");
  70. print("Opinia: ".$opinia. "<br/>");
  71. }
  72. }
  73.  
  74.  
  75. ?>
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82. </body>
  83. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement