Witajcie.
Nie wiem co sie stało i co zmienilo home, ale 3 lata skrypt działa a od 3 dni nie działa.. może wy mi powiecie dlaczego.
Php na serwerze to: PHP Version 5.2.17
kod
1 form
<?
// sprawdzamy, czy zmienna $submit jest pusta
if (empty($_POST['submit'])) { // wyświetlamy formularz
echo " <form action=\"mail1-2.php\" method=\"post\" > <tr>
<td style=\"margin-left:5px\">Treść wiadomości</td> <br />
<td><textarea name=\"Treść\" style=\"width: 250px; height: 100px\"></textarea></td> <br />
</tr>
<tr>
<td>Imię, nazwisko</td> <br />
<td><input type=\"text\" name=\"Imię\" style=\"width: 250px\"></td> <br />
</tr>
<tr>
<td>Adres e-mail</td> <br />
<td><input type=\"text\" name=\"e_mail2\" style=\"width: 250px\"></td> <br />
</tr>
<tr>
<td>Telefon</td> <br />
<td><input type=\"text\" name=\"Telefon\" style=\"width: 250px\"></td> <br />
</tr>
<tr>
<td> </td> <br />
<td><input type=\"submit\" name=\"submit\" value=\"Wyślij\">
<input type=\"reset\" value=\"Od nowa\"></td></form>
</tr> </p>
<br />
</div>";
}?>
2 send
<?
$sex = false;
if($_POST['Treść'] == ''){
$sex = true;
}
if($_POST['Imię'] == ''){
$sex = true;
}
if($_POST['e_mail2'] == ''){
$sex = true;
}
if($_POST['Telefon'] == ''){
$sex = true;
}
if ($sex == true ){
echo '<img src="images/Recepcja2.jpg" align="right" style="margin-top:35px; margin-right:15px;"> <center><h3><font color="red">Nie wypełniłeś wszystkich pól! Formularz nie zostanie wysłany.</font></h3></center> <br /> Wróć aby uzupełnić: <INPUT TYPE="button" VALUE="Wstecz" onClick="history.go(-1)">';
}
if($sex == false){
{
////////// USTAWIENIA //////////
@$email2 = $_POST['e_mail2'];
$email = 'testtesttest@gmail.com'; // Adres e-mail adresata
$subject = 'Wiadomosc ze strony'; // Temat listu
$message = ' <center><font color="green"><h3> Dziękujemy za kontakt !!</h3></font></center>'; // Komunikat
$error = ' <img src="images/Recepcja2.jpg" align="right" style="margin-top:35px; margin-right:15px;"> </h3> Wystąpił błąd podczas wysyłanie spróbuj ponownie!'; // Komunikat b3edu
$charset = 'UTF-8'; // Strona kodowa
//////////////////////////////
$head = "From: ".$email2."\r\n".
"MIME-Version: 1.0\r\n" .
"Content-Type: text/plain; charset=$charset\r\n" .
"Content-Transfer-Encoding: 8bit";
$body = '';
foreach ($_POST as $name => $value)
{
{
for ($i = 0; $i < count($value); $i++) {
}
}
}
}
else
{
}
}
?>