Nie wiem dlaczego, ale $_POST nie przesyła mi wszystkich danych. Przesyła kilka pierwszych i 3 ostatnie. Dziwna sprawa z tym...
Najlepiej chyba będzie jak wkleję całość:
<?php
if (isset($_POST['send_form2'])) { print_r($_POST).'<br /><br />'.$_POST['order']; /* Attachment */
$attachment_tmp_name = $_FILES['file']['tmp_name'];
$attachment_name = $_FILES['file']['name'];
/* Validation */
if (empty($_POST['company_name']) or
empty($_POST['email'])) { $error = true;
$error_msg = 'Proszę wypełnić pola oznaczone gwiazdką.';
}
$attachment_type = explode(".",$attachment_name); if ($attachment_type[1] != "gif" or $attachment_type[1] != "jpg" or $attachment_type != "pfd") {
$error = true;
$error_msg = 'Nieprawidłowy format pliku';
}
}
if (!preg_match("/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|
mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i", $_POST['email'])) { $error = true;
$error_msg = 'Wpisz poprawny adres email.';
}
$title = "=?UTF-8?B?".base64_encode('Otrzymałeś nową wiadomość od '.$_POST['email'])."?="; $date_today = date('d-m-Y'); $hour_mail = date('H:i:s');
/* Headers */
$headers = "From: $my_name <".$my_email.">\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/mixed;\n";
$headers .= "\tboundary=\"___$znacznik==\"";
$msg = "--___$znacznik==\n";
$msg .= "Content-Type: text/html; charset=\"utf-8\"\n";
$msg .= "Content-transfer-encoding: 7bit\n\n";
$msg .= '
Otrzymałeś wiadomość od: '.$_POST['name'].' ('.$_POST['email'].') dnia: '.$date_today.', o godzine: '.$hour_mail.'<br /><br />
Nazwa firmy: '.$_POST['company_name'].'<br />
Imię i nazwisko: '.$_POST['name'].'<br />
Telefon: '.$_POST['phone'].'<br />
Nazwa produktu: '.$_POST['product_name'].'<br />
Wymiary zewnętrzne: wysokość: '.$_POST['height'].', szerokość: '.$_POST['width'].'<br />
Informacje dodatkowe: '.$_POST['additional_information'].'<br />
Ilość frontów: '.$_POST['count'].'<br /><br />
<strong>Rodzaj podłoża:</strong> '.$_POST['type_of_soil'].'<br />
<strong>Zamówienie:</strong> '.$_POST['order'].'<br />
<strong>Rodzaj frontu:</strong> '.$_POST['type_of_soil2'].'<br />
<strong>Powierzchnia:</strong> '.$_POST['surface'].'<br />
<strong>Okno w klawiaturze</strong> '.$_POST['window'].'<br />
';
$msg .= "\n";
/* Attachment */
$msg .="--___$znacznik==\n";
$msg .="Content-Type: image/png/pdf/jpg\n";
$msg .="Content-Disposition: attachment;\n";
$msg .=" filename=\"$attachment_name\"\n";
$msg .="Content-Transfer-Encoding: base64\n\n";
$open_file = fopen($attachment_tmp_name,"rb"); $msg .="--___$znacznik==--\n";
}
// Send
if (@mail($_POST['email'], $title, $msg, $headers)) { echo 'Poprawnie wysłano wiadomość. Wkrótce odpowiemy.<br /><br />'; }
else {
echo 'Wystąpił błąd. Skontaktuj się z administratorem strony.'; }
}
else {
echo $error_msg.'<br /><a href="java script:history.back();">Wróć i popraw</a><br /><br />'; }
}
?>
<div class="left">
<form enctype="multipart/form-data" action="" method="post" id="form">
<input type="hidden" name="MAX_FILE_SIZE" value="50000" />
<table border="0" cellpadding="5" cellspacing="0">
<tr>
<td>* Nazwa firmy</td>
<td><input type="text" name="company_name" class="validate[required] text-input" /></td>
</tr>
<tr>
<td>Imię i nazwisko</td>
<td><input type="text" name="name" /></td>
</tr>
<tr>
<td>* Adres email</td>
<td><input type="text" name="email" class="validate[required,custom[email]] text-input" /></td>
</tr>
<tr>
<td>Telefon kontaktowy</td>
<td><input type="text" name="phone" /></td>
</tr>
<tr>
<td>Nazwa produktu</td>
<td><input type="text" name="product_name" /></td>
</tr>
<tr>
<td>Wymiary zewnętrzne<br />(w milimetrach)</td>
<td><input type="text" name="height" class="count" /> wys. <input type="text" name="width" class="count" /> szer.</td>
</tr>
<tr>
<td valign="top">Informacje dodatkowe</td>
<td><textarea name="additional_information" cols="" rows=""></textarea></td>
</tr>
<tr>
<td>Załącz plik/rysunek</td>
<td><input type="file" name="file" /> <a href="#" id="a"><a href="#" class="tip_trigger">(?)<span class="tip">możliwe rozszerzenia:<br />png, jpg, pdf</span></a></a></td>
</tr>
<tr>
<td>Ilość frontów</td>
<td><input type="text" name="count" size="8" class="count" /></td>
</tr>
<tr>
<td colspan="2">
<strong>Rodzaj podłoża</strong><br /><br />
<input type="radio" name="type_of_soil" value="wysokoenergetyczne (ABS, PC, ABS/PC, Aluminium, Stal)" checked /> wysokoenergetyczne (ABS, PC, ABS/PC, Aluminium, Stal)<br />
<input type="radio" name="type_of_soil" value="niskoenergetyczne (PP, PE, PS, lakier proszkowy)" /> niskoenergetyczne (PP, PE, PS, lakier proszkowy)
</td>
</tr>
</table>
</div>
<!-- Right -->
<div class="right">
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tr>
<td width="50%">
<strong>Zamówienie:</strong><br /><br />
<input type="radio" name="order" value="jednorazowe" checked /> jednorazowe<br />
<input type="radio" name="order" value="miesięczne" /> miesięczne<br />
<input type="radio" name="order" value="kwartalne" /> kwartalne<br />
<input type="radio" name="order" value="roczne" /> roczne
</td>
<td>
<strong>Rodzaj frontu</strong><br /><br />
<input type="radio" name="type_of_soil2" value="płaski" checked /> płaski<br />
<input type="radio" name="type_of_soil2" value="tłoczony" /> tłoczony<br />
<input type="radio" name="type_of_soil2" value="z wsuwką" /> z wsuwką<br />
<input type="radio" name="type_of_soil2" value="inny" /> inny
</td>
</tr>
<tr>
<td colspan="2">
<br /><strong>Powierzchnia</strong><br /><br />
<input type="radio" name="surface" value="matowa" checked /> matowa<br />
<input type="radio" name="surface" value="antyrefleksyjna (antiglare)" /> antyrefleksyjna (antiglare)<br />
<input type="radio" name="surface" value="błyszcząca" /> błyszcząca<br />
</td>
</tr>
<tr>
<td colspan="2">
<br /><strong>Okno w klawiaturze</strong><br /><br />
<input type="radio" name="window" value="transparentne błyszczące (LCD)" checked /> transparentne błyszczące (LCD)<br />
<input type="radio" name="window" value="półtransparentne z filtrem (LED)" /> półtransparentne z filtrem (LED)<br />
<input type="radio" name="window" value="okno usztywniane, grubość (mm)" /> okno usztywniane, grubość (mm) <input type="text" name="window_stiffened_size" class="count" /><br />
<input type="radio" name="window" value="z okno z panelem dotykowym, wymiary" /> okno z panelem dotykowym, wymiary <input type="text" name="window2_height" class="count" /> wys. <input type="text" name="window2_width" class="count" /> szer.<br />
<input type="radio" name="window" value="okno wycinan" /> okno wycinane<br />
<input type="radio" name="window" value="bez okna" /> bez okna<br />
</td>
</tr>
<tr>
<td colspan="2" align="right"><br /><input type="submit" value="wyślij zapytanie" name="send_form2" /></td>
</tr>
</table>
</div>
<div style="clear: both;"></div>
</form>
</div>
dostaje takie coś:
Array ( [MAX_FILE_SIZE
] => 50000
[company_name
] => nazwa firmy
[name
] => imię i nazwisko
[email
] => example
@example
.org
[phone
] => 123123123
[product_name
] => nazwa produktu
[height
] => 100
[width
] => 200
[additional_information
] => info dodatkowe
[count] => 10
[type_of_soil
] => wysokoenergetyczne
(ABS, PC
, ABS/PC
, Aluminium
, Stal
) [window_stiffened_size
] => 10 [window2_height
] => 0 [window2_width
] => 0 [send_form2
] => wyślij zapytanie
)
Logicznie to jest nie możliwe

doszedłem do tego, że jak wyrzucę:
<!-- Right -->
<table border="0" cellpadding="5" cellspacing="0" width="100%">
to wtedy działa, ale przecież to jest bez sensu
Ten post edytował d.stp 20.07.2012, 12:15:48