BuRcZyK
Senior User
- Joined
- Sep 2, 2010
- Messages
- 834
- Reaction score
- 35
Witam pisa?em skrypt w php ale co? nie wychodzi bo przez dotpay nie sprawdza kodu \/ Tylko odrazu wysy?a e-maila a powinno sprawdzi? i jak jest dobre to wys?a? e-maila.
PHP:
<?php
if (count($_POST))
{
////////// USTAWIENIA //////////
$email = 'xxxxx'; // Adres e-mail adresata
$subject = 'shop dbzf'; // Temat listu
$message = 'Dziekujemy. W ciagu 2 dni dostaniesz DM'; // Komunikat
$error = 'Wystapily problemy.'; // Komunikat b?‚?™du
$charset = 'iso-8859-2'; // 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
{
?>
<form action="?" method="post">
Nick (z gry)<br>
<textarea name="name" style="width: 200px; height: 20px;"></textarea>
<br />
<input type="radio" name="Rodzaj" value="Pacc" />Pacc 30 day<br />
Wersja testowa - Sprawna <br><br>Wyslij sms o tresci <strong>AP.DBZFDM</strong> na numer <strong>79068</strong> Koszt sms'a 10.98 z? brutto<br><br> <form action='sprawdzk.php' method='POST'>Wpisz otrzymany kod: <input type='text' name='check'>
<input type='submit' value='Sprawdz'></form><br />
<input type="reset" value="Wyczysc" />
</form>
<?php
}
?>