Mam prosty skrypt sondy:
<?require(\"tak_nie.php\");
if($glos!=\"\")
{
if ($glos == \"tak\")
{
$tak += 1;
}
else
{
$nie += 1;
}
}
$sonda = fopen( \"tak_nie.php\", \"w\" ); fputs( $sonda, \"<?phpn$tak=\"$tak\";n$nie=\"$nie\";n?>n\" );
fclose( $sonda );
$wynik=$tak+$nie.\"<br>\";
$tak_proc=($tak*100)/$wynik.\"<br>\";
$nie_proc=($nie*100)/$wynik.\"<br>\";
?>
<img src=\"tak.gif\" width=\"
<? echo $tak_proc;?>\" height=\"10\" border=0 alt=\"\">
<img src=\"nie.gif\" width=\"
<? echo $nie_proc;?>\" height=\"10\" border=0 alt=\"\">
<form method=\"post\" action=\"index.php\">
jakies pytanie?<br>
<input type=\"radio\" name=\"glos\" value=\"tak\" checked>Tak<br>
<input type=\"radio\" name=\"glos\" value=\"nie\">Nie<br>
<input type=\"submit\" value=\"zagłosuj\" class=\"input1\">
</form>
problem polega na tym, że po odświeżeniu strony dodaje mi dane do pliku, ma ktoś pomysł jak temu zaradzić?