
KOD:
- Kod: Zaznacz wszystko
- <?php
 if (count($_POST))
 {
 $email = 'xxx';
 $subject = 'Zgłoszenie';
 $message = 'Dziękujemy! Formularz został wysłany.';
 $error = 'Wystąpił błąd podczas wysyłania formularza';
 $charset = 'iso-8859-2';
 $head =
 "MIME-Version: 1.0\r\n" .
 "Content-Type: text/plain; charset=$charset\r\n" .
 "Content-Transfer-Encoding: 8bit";
 $body = '';
 foreach ($_POST as $name => $value)
 {
 if (is_array($value))
 {
 for ($i = 0; $i < count($value); $i++)
 {
 $body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value[$i]) : $value[$i]) . "\r\n";
 }
 }
 else $body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value) : $value) . "\r\n";
 }
 echo mail($email, "=?$charset?B?" . base64_encode($subject) . "?=", $body, $head) ? $message : $error;
 }
 else
 {
 ?>
 <form action="?" method="post">
 <table>
 <tr class="wiersz">
 <td class="lbl">*Nazwisko:</td><td class="wpis"><input class="input" type="text" name="Nazwisko" /></td>
 </tr>
 <tr class="wiersz">
 <td class="lbl">*Imię:</td><td class="wpis"><input class="input" type="text" name="Imię" /></td>
 </tr>
 <tr class="wiersz">
 <td class="lbl">*Firma:</td><td class="wpis"><input class="input" type="text" name="Firma" /></td>
 </tr>
 <tr class="wiersz">
 <td class="lbl">*Adres:</td><td class="wpis"><input class="input" type="text" name="Adres" /></td>
 </tr>
 <tr class="wiersz">
 <td class="lbl">*Kod pocztowy:</td><td class="wpis"><input class="input" type="text" name="Kod pocztowy" /></td>
 </tr>
 <tr class="wiersz">
 <td class="lbl">Adres E-mail:</td><td class="wpis"><input class="input" type="text" name="E-mail" /></td>
 </tr>
 </table>
 <br />
 <table>
 <tr class="wiersz">
 <td class="lbl">*<input type="checkbox" name="zgoda"/></td><td class="wpis_1"> xxxxxxxxxxxxxxxxxxxxxxxx.</td>
 </tr>
 </table>
 <input class="wyslij" type="submit" value="Wyślij" />
 </form>
 <?php
 }
 ?>


 
	



 
	
