Wielkie dzięki HWAO
--------------------------------------------------------------------------------------
edit:
Wymodziłem coś takiego, i na localu mi działa a na serwerku nie :-/.
Poprostu niedodaje głosów :-(
<pre><?php
$gra=$_REQUEST['najlepsza_gra'];
if($gra==\"sh1\"||$gra==\"sh2\"||$gra==\"sh3\"||$gra==\"sh4\")
$plik=fgets(fopen(\"data/sonda/$gra.txt\",\"r\" ),250); if(!($_COOKIE['sonda']==\"blokuj_sonde\"))
{
if($gra=='sh1')
{
$plik++;
echo'Twój głos został dodany.'; }
else
{
if($gra=='sh2')
{
$plik++;
echo'Twój głos został dodany.'; }
else
{
if($gra=='sh3')
{
$plik++;
echo'Twój głos został dodany.'; }
else
{
if($gra=='sh4')
{
$plik++;
echo'Twój głos został dodany.'; }
else
echo'Najlepszy Silent Hill według was to:<br>'; }
}
}
if($gra==\"sh1\"||$gra==\"sh2\"||$gra==\"sh3\"||$gra==\"sh4\")
{
fwrite(fopen(\"data/sonda/$gra.txt\",\"w\"),$plik,250); }
}
else
{
}
$sh1=fgets(fopen(\"data/sonda/sh1.txt\",\"r\" ),250); $sh2=fgets(fopen(\"data/sonda/sh2.txt\",\"r\" ),250); $sh3=fgets(fopen(\"data/sonda/sh3.txt\",\"r\" ),250); $sh4=fgets(fopen(\"data/sonda/sh4.txt\",\"r\" ),250); ';
echo\"<b>Silent Hill 1</b> <img src=\"rc.gif\" alt=\"Statystyka\" border=0 height=12 width=\"$sh1\" hspace=0 vspace=0> $sh1
\";
echo\"<b>Silent Hill 2</b> <img src=\"rc.gif\" alt=\"Statystyka\" border=0 height=12 width=\"$sh2\" hspace=0 vspace=0> $sh2
\";
echo\"<b>Silent Hill 3</b> <img src=\"rc.gif\" alt=\"Statystyka\" border=0 height=12 width=\"$sh3\" hspace=0 vspace=0> $sh3
\";
echo\"<b>Silent Hill 4</b> <img src=\"rc.gif\" alt=\"Statystyka\" border=0 height=12 width=\"$sh4\" hspace=0 vspace=0> $sh4
\";
?></pre>