Witam serdecznie. Mam na stronie poniższy kod. Zlecę przeróbkę tak aby zabezpieczyć ankietę przed wielokrotnym wypełnianiem za pomocą cookies lub za pomocą ip..
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Tytuł</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<?php
{
////////// USTAWIENIA //////////
$email = 'xxx@onet.pl'; // Adres e-mail adresata
$subject = 'Pytanie1'; // Temat listu
$message = 'Twoje odpowiedzi zostały przesłane!'; // Komunikat
$error = 'Wystąpił błąd! Spróbuj jeszcze raz!'; // 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)
{
{
for ($i = 0; $i < count($value); $i++)
{
}
}
}
}
else
{
?>
<form action="?" method="post">
<input name="Imię" />Podaj swój nick<br />
</br></br>
<!-- Pole typu RADIO -->
<p>Pytanie A</p>
<input type="radio" name="pytanieA" value="0" />0
<input type="radio" name="pytanieA" value="1" />1
</br></br>
<!-- Pole typu RADIO -->
<p>Pytanie B:</p>
<input type="radio" name="pytanieB" value="0" />0
<input type="radio" name="pytanieB" value="1" />1
<br /><br />
<!-- Przycisk WYŚLIJ -->
<input type="submit" value="Wyślij wynik" />
</form>
<?php
}
?>
</div>
<!-- End Right Column -->
<div class="clear"></div>
<!-- End Wrapper -->
</body>
</html>