Ich habe 2 fragen:
Erstmal der ganze code:
	
		
So jetzt kommt die serste sache die ich net verstehe:
	
		
Und jetzt das 2:
	
		
 So kann mir jetzt einer sagen was diese beiden sachen machen 
???
Danke schonmal euer,
Master X
					Erstmal der ganze code:
			
			
				<? 
if(isset($OK)) {
setcookie("OK", "yes", time()+1*24*60*60*60);
$wahl1 = file("wahl1.txt");
$wahl1 = file("wahl2.txt");
$wahl3 = file("wahl3.txt");
$wahlwert1 = $wahl1[0];
$wahlwert2 = $wahl2[0];
$wahlwert3 = $wahl3[0];
$insgesamt = $wahlwert1 + $wahlwert2 + $wahlwert3;
$new_file = fopen("$wahl.txt");
fwrite($new_file, $wahl + "1");
fclose($new_file);
?>
<b>Ergebnisse:</b><br>
Wahl1 =
<img src="umfrage.gif" height="10" width="<? echo round(($wahl1*100)/$insgesamt); ?>">,
<?php echo round(($wahl1*100)/$insgesamt); ?>%
<br>
Wahl2 =
<img src="umfrage.gif" height="10" width="<?php echo round(($wahl2*100)/$insgesamt); ?>,
<? echo round(($wahl2*100)/$insgesamt); ?>%<br>
$wahl3 =
<img src="umfrage.gif" height="10" width="<?php echo round(($wahl3*100)/$insgesamt); ?>,
<? echo round(($wahl3*100)/$insgesamt); ?>%<br>
<?
}
else {
?>
<form method="post" action="umfrage.php">
<input type="radio" value="wahl1"> Wahl1<br>
<input type="radio" value="wahl2"> Wahl2<br>
<input type="radio" value="wahl3"> Wahl3<br>
<input type="submit" value="OK" name="OK"><br>
<a href="umfrage.php">Ergebnisse</a>
<?
}
?>
	if(isset($OK)) {
setcookie("OK", "yes", time()+1*24*60*60*60);
$wahl1 = file("wahl1.txt");
$wahl1 = file("wahl2.txt");
$wahl3 = file("wahl3.txt");
$wahlwert1 = $wahl1[0];
$wahlwert2 = $wahl2[0];
$wahlwert3 = $wahl3[0];
$insgesamt = $wahlwert1 + $wahlwert2 + $wahlwert3;
$new_file = fopen("$wahl.txt");
fwrite($new_file, $wahl + "1");
fclose($new_file);
?>
<b>Ergebnisse:</b><br>
Wahl1 =
<img src="umfrage.gif" height="10" width="<? echo round(($wahl1*100)/$insgesamt); ?>">,
<?php echo round(($wahl1*100)/$insgesamt); ?>%
<br>
Wahl2 =
<img src="umfrage.gif" height="10" width="<?php echo round(($wahl2*100)/$insgesamt); ?>,
<? echo round(($wahl2*100)/$insgesamt); ?>%<br>
$wahl3 =
<img src="umfrage.gif" height="10" width="<?php echo round(($wahl3*100)/$insgesamt); ?>,
<? echo round(($wahl3*100)/$insgesamt); ?>%<br>
<?
}
else {
?>
<form method="post" action="umfrage.php">
<input type="radio" value="wahl1"> Wahl1<br>
<input type="radio" value="wahl2"> Wahl2<br>
<input type="radio" value="wahl3"> Wahl3<br>
<input type="submit" value="OK" name="OK"><br>
<a href="umfrage.php">Ergebnisse</a>
<?
}
?>
			
			
				<? echo round(($wahl1*100)/$insgesamt); ?>
			
		
	
			
			
				$new_file =  fopen("$wahl.txt"); 
fwrite($new_file, $wahl + "1");
fclose($new_file);
	fwrite($new_file, $wahl + "1");
fclose($new_file);
???Danke schonmal euer,
Master X
          
 Moderator
Kommentar