Je moet ingelogd zijn om te stemmen.
<?php include('config.php'); if(!isset($_SESSION['gebruiker'])) { header("Location: login.php"); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title><?=$cfg['site']?></title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body bgcolor="#999999"> <?php $lid = mysql_query("SELECT * FROM leden ORDER BY gebruikersnaam ASC"); $geld = mysql_fetch_array($lid); ?> <table width="100%"> <tr><th colspan="2">Ledenlijst</th></tr> <tr><td><b>Naam</b></td><td><b>Totaal geld</b></td></tr> <?php while($leden=mysql_fetch_array($lid)){ $totaalgeld = $geld['bank']+$geld['contant']; ?> <tr> <td><?php echo $leden['gebruikersnaam'] ?></td> <td><?php echo $totaalgeld ?></td> </tr> <?php } mysql_close(); ?> </body> </html> </body> </html>
<?phpinclude('config.php');if(!isset($_SESSION['gebruiker'])) { header("Location: login.php");}?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title><?=$cfg['site']?></title><link rel="stylesheet" type="text/css" href="style.css"></head><body bgcolor="#999999"><?php $lid = mysql_query("SELECT * FROM leden ORDER BY gebruikersnaam ASC"); $geld = mysql_fetch_array($lid);?><table width="100%"> <tr><th colspan="2">Ledenlijst</th></tr> <tr><td><b>Naam</b></td><td><b>Totaal geld</b></td></tr><?php while($leden=mysql_fetch_array($lid)){ $totaalgeld = $geld['bank']+$geld['contant'];?> <tr> <td><?php echo $leden['gebruikersnaam'] ?></td> <td><?php echo $totaalgeld ?></td> </tr><?php } mysql_close();?></body></html></body></html>
<?php ... <?php $i = 0; while($leden=mysql_fetch_array($lid)){ $totaalgeld = $geld[$i]['bank']+$geld[$i]['contant']; ?> <tr> <td><?php echo $leden['gebruikersnaam'] ?></td> <td><?php echo $totaalgeld ?></td> </tr> <?php $i++ } mysql_close(); ?> ... ?>
<?php... <?php$i = 0; while($leden=mysql_fetch_array($lid)){ $totaalgeld = $geld[$i]['bank']+$geld[$i]['contant'];?> <tr> <td><?php echo $leden['gebruikersnaam'] ?></td> <td><?php echo $totaalgeld ?></td> </tr><?php$i++ } mysql_close();?> ...?>
<?php include('config.php'); if(!isset($_SESSION['gebruiker'])) { header("Location: login.php"); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title><?=$cfg['site']?></title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body bgcolor="#999999"> <?php $lid = mysql_query("SELECT * FROM leden ORDER BY gebruikersnaam ASC"); $geld = mysql_fetch_array($lid); ?> <table width="100%"> <tr><th colspan="2">Ledenlijst</th></tr> <tr><td><b>Naam</b></td><td><b>Totaal geld</b></td></tr> <?php $i = 0; while($leden=mysql_fetch_array($lid)){ $totaalgeld = $geld[$i]['bank']+$geld[$i]['contant']; ?> <tr> <td><?php echo $leden['gebruikersnaam'] ?></td> <td><?php echo $totaalgeld ?></td> </tr> <?php $i++ } mysql_close(); ?> </body> </html>
<?phpinclude('config.php');if(!isset($_SESSION['gebruiker'])) { header("Location: login.php");}?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title><?=$cfg['site']?></title><link rel="stylesheet" type="text/css" href="style.css"></head><body bgcolor="#999999"><?php $lid = mysql_query("SELECT * FROM leden ORDER BY gebruikersnaam ASC"); $geld = mysql_fetch_array($lid);?><table width="100%"> <tr><th colspan="2">Ledenlijst</th></tr> <tr><td><b>Naam</b></td><td><b>Totaal geld</b></td></tr><?php$i = 0; while($leden=mysql_fetch_array($lid)){ $totaalgeld = $geld[$i]['bank']+$geld[$i]['contant'];?> <tr> <td><?php echo $leden['gebruikersnaam'] ?></td> <td><?php echo $totaalgeld ?></td> </tr><?php$i++} mysql_close();?></body></html>
$i++ }
$i++}
<?PHP while($var = mysql_fetch_assoc($resultaat)) { $sGeld = "SELECT bank, contant FROM leden WHERE gebruikersnaam='".$var['gebruikersnaam']."'"; $rResultGeld = MySQL_Query($sGeld) or die(MySQL_Error()); while($aFetchGeld = MySQL_Fetch_Assoc($rResultGeld)) { $totaalgeld = $aFetchGeld['bank']+$aFetchGeld['contant']; } echo $totaalgeld; } ?>
<?PHPwhile($var = mysql_fetch_assoc($resultaat)){ $sGeld = "SELECT bank, contant FROM leden WHERE gebruikersnaam='".$var['gebruikersnaam']."'"; $rResultGeld = MySQL_Query($sGeld) or die(MySQL_Error()); while($aFetchGeld = MySQL_Fetch_Assoc($rResultGeld)) { $totaalgeld = $aFetchGeld['bank']+$aFetchGeld['contant']; } echo $totaalgeld;}?>
<?php foreach( $geld as $key => $value ) { echo $key ."=>".$value."<br />"; } ?>
<?phpforeach( $geld as $key => $value ){ echo $key ."=>".$value."<br />"; }?>