Forum Moderators: coopster
results:
1. ]]]]]]]]]] 50%
2. ]]]]]] 30%
3. ]]]] 20%
it has 2 limitations that i can see...my host doesn't allow SQL databases...so it needs to be flat file, and it cant use a <table> tag...not sure exactly why...
anyways i was just wondering if any of you have seen a script like this or one that would be easy to modify to be like this. THANKS
Hope this helps.
NS
//count number of every vote
$vdir = "$userdir/votes";
$dh = opendir($vdir);
$vttl = 0;
while (false!== ($filename = readdir($dh))) {
$files[] = $filename;
if (($filename!= ".") AND ($filename!= "..")){
$vttl++; //total number of votes
include("$vdir/$filename");
for($i=1;$i<5;$i++) {
$qn = "nv$i";
$qn = stripslashes(htmlspecialchars($$qn));
if ($v == $i) { $qn++; }
} } }
for($i=1;$i<5;$i++) {
$qn = "nv$i";
$qn = stripslashes(htmlspecialchars($$qn));
$asdf = "ab$i";
$asdf = stripslashes(htmlspecialchars($$asdf));
$asdf = $qn/$vttl;
$asdf = $asdf*20;
// display results
$pb = "pa$i";
$pb = stripslashes(htmlspecialchars($$pb));
echo "<br>$pb ";
$asdf = stripslashes(htmlspecialchars($$asdf));
$asdf = $asdf-1;
for($l=1;$l<$asdf;$l++) {
echo "]";
} }