Jak zrobić w sondzie aby mozna bylo oddawać tylko jeden glos, skrypt sondy zawart jest w trzech plikach
pierwszy index
<?php
<form onsubmit=\"window.open('add_user.php','gate','toolbar=no,scrollbars=no,directories=no,status=no,menubar=no,resizable=no,width=
00,height=300')\" method=\"POST\" action=\"glosuj.php\" target=gate >
<font><center><b>Których tapet powinno być więcej?</b></center>
<input type=\"hidden\" name=\"id\" value=\"115821\">
<input type=\"hidden\" name=\"uid\" value=\"95782\">
<div style=\"margin-left:10px\">
<input type=radio name=sonda value=1 checked>Krajobrazy<br>
<input type=radio name=sonda value=2>Motoryzacja<br>
<input type=radio name=sonda value=3>Kosmos<br>
<input type=radio name=sonda value=4>Zabytki<br>
<input type=radio name=sonda value=5>Zwierzęta<br></div>
<center><input type=submit value=\"Głosuj\" class=submit><br>
<a href=wyniki_sondy.php target=gate2 onClick=\"window.open('add_user.php','gate2','toolbar=no,scrollbars=no,directories=no,status=no,menubar=no,resizable=no,width=
00,height=300')\">Zobacz wyniki</a>
?>
drugi glosuj
<?php
$licn=fopen(\"$sonda.txt\",\"r+\"); $licn=fopen(\"$sonda.txt\",\"w\"); $viz=$pob + $x;
?>
<html><head><title>x</title></head>
<body>
<script language=javascript>
window.location.href=\"wyniki_sondy.php\"
</script>
trzeci wyniki_sondy
<?
$dl=80;
$w1=fopen(\"1.txt\",\"r+\"); $w2=fopen(\"2.txt\",\"r+\"); $w3=fopen(\"3.txt\",\"r+\"); $w4=fopen(\"4.txt\",\"r+\"); $w5=fopen(\"5.txt\",\"r+\");
$x=$war1 + $war2 + $war3 + $war4 + $war5;
if ($x==\"0\"){
$wy1=1;
$wy2=1;
$wy3=1;
$wy4=1;
$wy5=1;
$wyp1=0;
$wyp2=0;
$wyp3=0;
$wyp4=0;
$wyp5=0;
}
else {
$wy1=ceil($war1 / $x * $dl); $wy2=ceil($war2 / $x * $dl); $wy3=ceil($war3 / $x * $dl); $wy4=ceil($war4 / $x * $dl); $wy5=ceil($war5 / $x * $dl);
$wyp1=ceil($war1 / $x * 100
); $wyp2=ceil($war2 / $x * 100
); $wyp3=ceil($war3 / $x * 100
); $wyp4=ceil($war4 / $x * 100
); $wyp5=ceil($war5 / $x * 100
); }
echo \"<center><font>Głosów łącznie: <b>$x</b></center> <br>
<div align=left style=\"margin-left:50px\">
<img src=grafika/son.jpg height=20 width=$wy1><br><font><b>Bardzo dobrze</b>, Głosów: <b>$war1 </b>($wyp1%)<br>
<img src=grafika/son.jpg height=20 width=$wy2><br><font><b>Dobrze</b>, Głosów: <b>$war2 </b>($wyp2%)<br>
<img src=grafika/son.jpg height=20 width=$wy3><br><font><b>Dostatecznie</b>, Głosów: <b>$war3 </b>($wyp3%)<br>
<img src=grafika/son.jpg height=20 width=$wy4><br><font><b>Miernie</b>, Głosów: <b>$war4 </b>($wyp4%)<br>
<img src=grafika/son.jpg height=20 width=$wy5><br><font><b>Bardzo źle</b>, Głosów: <b>$war5 </b>($wyp5%)<br>
\";
?>