Witam potrzebuje pomocy, nie wiem jak zmienic kod php aby pola (oznaczone *) byly wymagane. oto kod:
<?php
if (count($_POST))
{
////////// USTAWIENIA //////////
$email = 'dirtsquad@dirt-squad.pl'; // Adres e-mail adresata
$subject = 'Zgłoszenie Ofertowe'; // Temat listu
$message = 'Dziękujemy za wysłanie formularza'; // Komunikat
$error = 'Wystąpił błąd podczas wysyłania formularza'; // Komunikat błędu
$charset = 'utf-8'; // Strona kodowa
//////////////////////////////
$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
{
?>
<font size="2">Imię, Nazwisko:</font></p>
<p style="margin-top: -10px; margin-bottom: 10px"> <input name="reqImięiNazwisko" size="60" />*<br />
<font size="2">Adres:</font></p>
<p style="margin-top: -10px; margin-bottom: 10px">
<input name="reqAdres" size="60" />*<br />
<font size="2">Kod:</font></p>
<p style="margin-top: -10px; margin-bottom: 10px">
<input name="reqKod" size="10" />*<br />
<font size="2">Miejscowość:</font></p>
<p style="margin-top: -10px; margin-bottom: 10px">
<input name="reqMiejscowosc" size="60" />*<br />
<font size="2">Telefon:</font></p>
<p style="margin-top: -10px; margin-bottom: 10px">
<input name="reqTelefon" size="60" />*<br />
<font size="2">Email:</font></p>
<p style="margin-top: -10px; margin-bottom: 10px">
<input name="reqEmail" size="60" />*<br />
<font size="2">Firma:</font></p>
<p style="margin-top: -10px; margin-bottom: 10px">
<input name="Firma" size="60" /><br />
<font size="2">Nr Faktury:</font></p>
<p style="margin-top: -10px; margin-bottom: 10px">
<input name="reqNrFaktury" size="60" />*<br />
<font size="2">Nazwa Produktu:</font></p>
<p style="margin-top: -10px; margin-bottom: 10px">
<input name="reqNazwaProduktu" size="60" />*<br />
<font size="2">Nr Seryjny:</font></p>
<p style="margin-top: -10px; margin-bottom: 10px">
<input name="reqNrSeryjny" size="60" />
*<p style="margin-top: -10px; margin-bottom: 10px"><font size="2">Powód Reklamacji:</font></p>
<p style="margin-top: -10px; margin-bottom: 10px">
<textarea name="reqPowodReklamacji" cols="45" rows="4">Uzupełnij...</textarea>
*<br /><br /><br />
<!-- Przycisk WYŚLIJ -->
<input type="submit" value="Wyślij formularz" />
<!-- Przycisk WYCZYŚĆ DANE -->
<input type="reset" value="Wyczyść dane" />
</p>
</div>
</form>
<?php
}
?>
Bardzo dziekuje za pomoc!!!