Facebook
From Gray Pintail, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 155
  1. <!DOCTYPE html>
  2. <html lang="pl">
  3. <head>
  4.         <title>Formularz</title>
  5.         <meta charset="utf-8">
  6.  
  7.         <link rel="Stylesheet" type="text/css" href="css.css" />
  8. </head>
  9. <body>
  10.         <form method="post" action="php.php"><center>
  11.  
  12.         <table border="0" cellpadding="5" cellspacing="1">
  13.         <tr>
  14.         <td>Imie:</td>
  15.         <td><input type="text" name="imie"></td>
  16.         </tr>
  17.        
  18.                 <tr>
  19.         <td>Nazwisko:</td>
  20.         <td><input type="text" name="nazwisko"></td>
  21.         </tr>
  22.        
  23.                 <tr>
  24.         <td>Numer rejestracyjny:</td>
  25.         <td><input type="text" name="rejestr"></td>
  26.         </tr>
  27.        
  28.        
  29.                         <tr>
  30.         <td>Zaliczka:</td>
  31.         <td><input type="text" name="zaliczka"></td>
  32.         </tr>
  33.        
  34.                         <tr>
  35.         <td>Tryb naprawy</td>
  36.         <td>
  37.                 <select name="tryb">
  38.                 <option value="Standardowy">Standardowy</option>
  39.                 <option value="Szybki">Szybki</option>
  40.                 </select>
  41.         </td>
  42.         </tr>
  43. </table><br>
  44. <input type="submit" value="Wyślij"><input type="reset" value="Wyczyść">
  45.  
  46. </center></form>
  47. </body>
  48. </html>
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. <head><link rel='Stylesheet' type='text/css' href='css.css'/></head>
  71. <?php
  72.  
  73. $imie = $_POST['imie'];
  74. $nazw = $_POST['nazwisko'];
  75. $rejestr = $_POST['rejestr'];
  76. $tryb = $_POST['tryb'];
  77. $zaliczka = $_POST['zaliczka'];
  78. $data = getdate();
  79. $dzien = $data['mday'];
  80. $mies = $data['mon'];
  81. $rok = $data['year'];
  82.  
  83. echo "<center>Data: ".$dzien."-".$mies."-".$rok."</center>";
  84. echo "<center><fieldset id='pole'>";
  85.  
  86.  
  87.  
  88.  
  89. echo "<br>";
  90. echo "<legend>Dane właściciela</legend>";
  91. //imie
  92. if($imie != null)
  93. {
  94.         echo "imie: ".$imie;
  95. }
  96. else
  97. {
  98.         echo "<div id='ost'>Nie podano imienia</div>";
  99. }
  100. echo "<br>";
  101. //naziwsko
  102. if($nazw != null)
  103. {
  104.         echo "Nazwisko: ".$nazw;
  105. }
  106. else
  107. {
  108.         echo "<div id='ost'>Nie podano nazwiska</div>";
  109. }
  110.  
  111. echo "<br>";
  112. //rejestr
  113. if($rejestr != null)
  114. {
  115.         echo "Naumer rejestracyjny: ".$rejestr;
  116. }
  117. else
  118. {
  119.         echo "<div id='ost'>Nie podano numeru rejestracyjnego</div>";
  120. }
  121. echo "<br>";
  122. //zaliczka
  123. if($zaliczka != null)
  124. {
  125.         echo "Zaliczka: ".$zaliczka;
  126. }
  127. else
  128. {
  129.         echo "<div id='ost'>Nie podano zaliczki</div>";
  130. }
  131. echo "<br><br>";
  132. //tryb
  133. if($tryb == "Szybki")
  134. {
  135.         echo "Tryb naprawy: <a id='ost'>Szybki</div>";
  136. }
  137. elseif($tryb == "Standardowy")
  138. {
  139.         echo "Tryb naprawy: Standardowy";
  140. }
  141. if($imie != null && $nazw != null && $rejestr != null && $zaliczka != null)
  142. {
  143.         $plik = fopen("Pokwitowanie", "a");
  144.        
  145. }
  146.  
  147.  
  148. echo "</fieldset></center>";
  149. ?>
  150.