Onbekend |
|
In deze lijst staat de top 5 van mijn spelers, maar als je drukt op "volledige spelerslijst", moeten alle spelers komen, maa dan krijg ik een error
Citaat: Parse error: syntax error, unexpected T_ELSE in /home2/mats/public_html/counter-terrors/snake/snake.php on line 61
deze error krijg ik als ik naar de pagina snake.php ga
<?php
include('config.php');
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>snake</title>
<style type="text/css">
<!--
.style3 {
color: #00FF00;
font: bold;
}
.style4 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style5 {font-size: x-large; color: #FF0000;}
-->
</style>
<script type="text/javascript">
function popup(url,winName,W,H,X,Y) {
if(W == undefined) W = 300; //default width
if(H == undefined) H = 350; //default height
if(X == undefined) X = screen.width/2-W/2; //default Xpos (is now centered)
if(Y == undefined) Y = screen.height/2-H/2; //default Ypos (is now centered)
winprops = 'height='+H+',width='+W+',top='+X+',left='+Y+',scr ollbars=no';
win = window.open(url, winName, winprops);
if (parseInt(navigator.appVersion) >= 4) {
win.window.focus();
}
}
</script>
</head>
<body bgcolor="#0066ff">
<div align="center" class="style4">
<table width="400" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr><td colspan="3"><div align="center" class="style5">Top 5 beste spelers </div></td></tr>
<?php
if($_GET['list'] == "full") {
$lid = mysql_query("SELECT * FROM `snake` ORDER BY score DESC");
$j=$begin+0;
?>
<tr>
<td width="10%"><div align="center" class="style3">#</div></td>
<td width="54%"><div align="center" class="style3">naam</div></td>
<td width="36%"><div align="center" class="style3">Score</div></td>
</tr>
<?php
while($leden=mysql_fetch_array($lid)){
$j++;
?>
<tr>
<td><?php echo $j ?></td>
<td><?php echo $leden['naam'] ?></td>
<td><?php echo $leden['score'] ?></td>
</tr>
<?php
} else {
$lid = mysql_query("SELECT * FROM `snake` ORDER BY score DESC LIMIT 0,5");
$j=$begin+0;
?>
<tr>
<td width="10%"><div align="center" class="style3">#</div></td>
<td width="54%"><div align="center" class="style3">naam</div></td>
<td width="36%"><div align="center" class="style3">Score</div></td>
</tr>
<?php
while($leden=mysql_fetch_array($lid)){
$j++;
?>
<tr>
<td><?php echo $j ?></td>
<td><?php echo $leden['naam'] ?></td>
<td><?php echo $leden['score'] ?></td>
</tr>
<?php
}
mysql_close();
}
?>
</table>
<p><a href="snake.php?list=full">Volledige spelerslijst</a></p>
<p><a href="javascript:popup('snake/snake.swf','myPopUp')">Open snake</a> </p>
</div>
</body>
</html>
<?php include('config.php'); ?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>snake</title> <style type="text/css"> <!-- .style3 { color: #00FF00; font: bold; } .style4 {font-family: Verdana, Arial, Helvetica, sans-serif} .style5 {font-size: x-large; color: #FF0000;} --> </style> <script type="text/javascript"> function popup(url,winName,W,H,X,Y) { if(W == undefined) W = 300; //default width if(H == undefined) H = 350; //default height if(X == undefined) X = screen.width/2-W/2; //default Xpos (is now centered) if(Y == undefined) Y = screen.height/2-H/2; //default Ypos (is now centered) winprops = 'height='+H+',width='+W+',top='+X+',left='+Y+',scr ollbars=no'; win = window.open(url, winName, winprops); if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } </script> </head> <body bgcolor="#0066ff"> <div align="center" class="style4"> <table width="400" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000"> <tr><td colspan="3"><div align="center" class="style5">Top 5 beste spelers </div></td></tr> <?php if($_GET['list'] == "full") { $lid = mysql_query("SELECT * FROM `snake` ORDER BY score DESC"); $j=$begin+0; ?> <tr> <td width="10%"><div align="center" class="style3">#</div></td> <td width="54%"><div align="center" class="style3">naam</div></td> <td width="36%"><div align="center" class="style3">Score</div></td> </tr> <?php $j++; ?> <tr> <td> <?php echo $j ?></td> <td> <?php echo $leden['naam'] ?></td> <td> <?php echo $leden['score'] ?></td> </tr> <?php } else { $lid = mysql_query("SELECT * FROM `snake` ORDER BY score DESC LIMIT 0,5"); $j=$begin+0; ?> <tr> <td width="10%"><div align="center" class="style3">#</div></td> <td width="54%"><div align="center" class="style3">naam</div></td> <td width="36%"><div align="center" class="style3">Score</div></td> </tr> <?php $j++; ?> <tr> <td> <?php echo $j ?></td> <td> <?php echo $leden['naam'] ?></td> <td> <?php echo $leden['score'] ?></td> </tr> <?php } } ?> </table> <p><a href="snake.php?list=full">Volledige spelerslijst</a></p> <p><a href="javascript:popup('snake/snake.swf','myPopUp')">Open snake</a> </p> </div> </body> </html>
|