$totvotes = $yescount + $nocount + $undcount + $uncast; $yesper = $yescount / $totvotes * 100; $noper = $nocount / $totvotes * 100; $undper = $undcount / $totvotes * 100; $uncper = $uncast / $totvotes * 100; $totvotes = $preyescount + $prenocount + $preundcount; $preyesper = $preyescount / $totvotes * 100; $prenoper = $prenocount / $totvotes * 100; $preundper = $preundcount / $totvotes * 100; //before we write to the DB lets figure out the stats? $txt = $date.": " . $logstr; $myfile = file_put_contents($logfile, $txt.PHP_EOL , FILE_APPEND | LOCK_EX); ?>
Polling:
Where users of this calculator stand
* an uncast vote means after seeing their results the user did not tell us if their opinion changed.