hi ich hab ein kleines problem mit html und zwar hab ich ne umfrage die im firefox funktioniert aber im internet explorer nicht und ich weis nich warum
also der php code lautet:
und nach dem parsen so:
wisst ihr wo da das problem ist?
edit: ups sorry das ich mit mysql forum gepostet habe hab mich wohl etwas verklickt
also der php code lautet:
Code:
<?php $poll_name = "Wie findet ihr FF 12?"; //Umfragetitel $poll_answers = array("fantastisch","super","toll","mal schauen","könnte besser sein"); $file = "umfrage-1.txt"; //Umfragendatei echo " <form action='ka.html' method='post'> <center>$poll_name</center> "; $i = 0; $j = 0; while(isset($poll_answers[$i])){ $j=$i+1; echo " <input type='radio' name='answer' value='$j'> $poll_answers[$i] \n"; $i++; } $results = file($file,"r"); if($answer != ""){ $results[$answer-1] = $results[$answer-1]+1; $tmp = fopen($file,"w"); foreach($results as $save) fputs($tmp,chop($save)."\n"); fclose($tmp); } $total = 0; foreach($results as $num) $total = $total + $num; echo " <input type='submit' value='Go!'> <center>Ergebnisse</center> "; $i = 0; while(isset($results[$i])){ echo " $poll_answers[$i]: $results[$i] "; $i++; } echo "Gesamt: $total.</form> "; ?>
Code:
<form action='ka.html' method='post'> <center>Wie findet ihr FF 12?</center> <input type='radio' name='answer' value='1'> fantastisch <input type='radio' name='answer' value='2'> super <input type='radio' name='answer' value='3'> toll <input type='radio' name='answer' value='4'> mal schauen <input type='radio' name='answer' value='5'> könnte besser sein <input type='submit' value='Go!'> <center>Ergebnisse</center> fantastisch: 0 super: 1 toll: 0 mal schauen: 0 könnte besser sein: 0 Gesamt: 1.</form>
edit: ups sorry das ich mit mysql forum gepostet habe hab mich wohl etwas verklickt
Kommentar