Fejl med denne kode?
Hejsa.. Nu har jeg siddet og rodet med en kode i et par dage men kan STADIG ikke finde den fejl. =/Dette er siden som poster:
<?
session_start();
include "../../inc/db.php";
include "../../inc/config.php";
?>
<html>
<head>
<title>Ns Replay</title>
<LINK REL="STYLESHEET" HREF="../../inc/style.css" TYPE="text/css">
</head>
<body scroll="yes">
<?
if(isset($_SESSION[brugernavn])) {
?>
<?
$query = mysql_query("SELECT * FROM brugere") or die(mysql_error());
$nummer = mysql_num_rows($query);
?>
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="50%" valign="bottom" height="1"><b><font size="1">Community</font></b></td>
<td valign="bottom" align="right" height="1">Brugere ialt: <? echo "$nummer"; ?> </td>
</tr>
<tr>
<td width="100%" colspan="2" height="7"><img src="../../gfx/diverse/streg.gif"></td>
</tr>
<tr>
<td colspan="2" height="1">
<?
if($_SESSION[status] == 'Webmaster' OR $_SESSION[status] == 'Redaktør') {
?>
<button onclick="java script:location.href='../funktioner.php'" style="height: 17px; width: 40px;">Start</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='egenprofil.php'" style="height: 17px; width: 45px;">Profil</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='beskedsystem.php'" style="height: 17px; width: 95px;">Besked System</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='brugerliste.php'" style="height: 17px; width: 73px;">Brugerliste</button><br><br style="font-size: 1px;">
<button onclick="java script:location.href='forum.php'" style="height: 17px; width: 52px;">Forum</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='indsendartikel.php'" style="height: 17px; width: 92px;">Indsend artikel</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='statistik.php'" style="height: 17px; width: 61px;">Statistik</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='admin.php'" style="height: 17px; width: 48;">Admin</button>
<?
} elseif ($_SESSION[status] == 'bruger') {
?>
<button onclick="java script:location.href='../funktioner.php'" style="height: 17px; width: 40px;">Start</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='egenprofil.php'" style="height: 17px; width: 45px;">Profil</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='beskedsystem.php'" style="height: 17px; width: 95px;">Besked System</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='brugerliste.php'" style="height: 17px; width: 73px;">Brugerliste</button><br><br style="font-size: 1px;">
<button onclick="java script:location.href='forum.php'" style="height: 17px; width: 60px;">Forum</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='indsendartikel.php'" style="height: 17px; width: 115px;">Indsend artikel</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='statistik.php'" style="height: 17px; width: 80px;">Statistik</button>
<?
} else {
echo "Hvis denne tekst forekommer bedes du kontakte en admin, hvis du er en som prøver og hacke vores system bedes du fucke af helvedes til!";
}
?>
</td>
</tr>
<tr>
<td width="100%" colspan="2" height="7"><img src="../../gfx/diverse/streg.gif"></td>
</tr>
<tr>
<td width="100%" colspan="2" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><b>Top10</b></td>
</tr>
<tr>
<td width="100%"><img src="http://www.mikze.dk/olemongolstyrer/gfx/diverse/streg.gif"></td>
</tr>
<tr>
<td width="100%">
<select name="profilmenu" style="width: 100%;" onchange="java script:location.href=this.value;">
<option value="egenprofil.php">Se profil</option>
<option value="retprofil.php">Ret profil</option>
<option value="skiftkode.php">Skift Kode</option>
<option value="tagwall.php">Gæstebog</option>
<option value="top10.php" selected>Top 10</option>
<option value="afstemning.php">Afstemning</option>
</select>
</td>
</tr>
<tr>
<td width="100%"><img src="http://www.mikze.dk/olemongolstyrer/gfx/diverse/streg.gif"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form action="dotop10.php" method="post">
<tr>
<td width="100" valign="center">Overskrift:</td>
<td valign="top"><input type="text" style="width: 172px;" name="overskrift"></td>
</tr>
<tr>
<td width="100" valign="center">#1:</td>
<td valign="top"><input type="text" style="width: 172px;" name="et"></td>
</tr>
<tr>
<td width="100" valign="center">#2:</td>
<td valign="top"><input type="text" style="width: 172px;" name="to"></td>
</tr>
<tr>
<td width="100" valign="center">#3:</td>
<td valign="top"><input type="text" style="width: 172px;" name="tre"></td>
</tr>
<tr>
<td width="100" valign="center">#4:</td>
<td valign="top"><input type="text" style="width: 172px;" name="fire"></td>
</tr>
<tr>
<td width="100" valign="center">#5:</td>
<td valign="top"><input type="text" style="width: 172px;" name="fem"></td>
</tr>
<tr>
<td width="100" valign="center">#6:</td>
<td valign="top"><input type="text" style="width: 172px;" name="seks"></td>
</tr>
<tr>
<td width="100" valign="center">#7:</td>
<td valign="top"><input type="text" style="width: 172px;" name="syv"></td>
</tr>
<tr>
<td width="100" valign="center">#8:</td>
<td valign="top"><input type="text" style="width: 172px;" name="otte"></td>
</tr>
<tr>
<td width="100" valign="center">#9:</td>
<td valign="top"><input type="text" style="width: 172px;" name="ni"></td>
</tr>
<tr>
<td width="100" valign="center">#10:</td>
<td valign="top"><input type="text" style="width: 172px;" name="ti"></td>
</tr>
<tr>
<td width="100" height="1" valign="center"></td>
<td valign="top" height="1"></td>
</tr>
<tr>
<td width="100" valign="center"></td>
<td valign="top"><input type="submit" style="width: 172px;" value="Opret Top10!"></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<?
} else {
echo "Du skal være logget ind for og kunne se denne side!";
}
?>
</body>
</html>
$@$@$@$@$@$@$@$ Og dette er siden som modtager:
<?
session_start();
include "../../inc/db.php";
include "../../inc/config.php";
?>
<html>
<head>
<title>Ns Replay</title>
<LINK REL="STYLESHEET" HREF="../../inc/style.css" TYPE="text/css">
</head>
<body scroll="yes">
<?
if(isset($_SESSION[brugernavn])) {
?>
<?
$query = mysql_query("SELECT * FROM brugere") or die(mysql_error());
$nummer = mysql_num_rows($query);
?>
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="50%" valign="bottom" height="1"><b><font size="1">Community</font></b></td>
<td valign="bottom" align="right" height="1">Brugere ialt: <? echo "$nummer"; ?> </td>
</tr>
<tr>
<td width="100%" colspan="2" height="7"><img src="../../gfx/diverse/streg.gif"></td>
</tr>
<tr>
<td colspan="2" height="1">
<?
if($_SESSION[status] == 'Webmaster' OR $_SESSION[status] == 'Redaktør') {
?>
<button onclick="java script:location.href='../funktioner.php'" style="height: 17px; width: 40px;">Start</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='egenprofil.php'" style="height: 17px; width: 45px;">Profil</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='beskedsystem.php'" style="height: 17px; width: 95px;">Besked System</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='brugerliste.php'" style="height: 17px; width: 73px;">Brugerliste</button><br><br style="font-size: 1px;">
<button onclick="java script:location.href='forum.php'" style="height: 17px; width: 52px;">Forum</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='indsendartikel.php'" style="height: 17px; width: 92px;">Indsend artikel</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='statistik.php'" style="height: 17px; width: 61px;">Statistik</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='admin.php'" style="height: 17px; width: 48;">Admin</button>
<?
} elseif ($_SESSION[status] == 'bruger') {
?>
<button onclick="java script:location.href='../funktioner.php'" style="height: 17px; width: 40px;">Start</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='egenprofil.php'" style="height: 17px; width: 45px;">Profil</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='beskedsystem.php'" style="height: 17px; width: 95px;">Besked System</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='brugerliste.php'" style="height: 17px; width: 73px;">Brugerliste</button><br><br style="font-size: 1px;">
<button onclick="java script:location.href='forum.php'" style="height: 17px; width: 60px;">Forum</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='indsendartikel.php'" style="height: 17px; width: 115px;">Indsend artikel</button><font style="font-size: 5px;"> </font><button onclick="java script:location.href='statistik.php'" style="height: 17px; width: 80px;">Statistik</button>
<?
} else {
echo "Hvis denne tekst forekommer bedes du kontakte en admin, hvis du er en som prøver og hacke vores system bedes du fucke af helvedes til!";
}
?>
</td>
</tr>
<tr>
<td width="100%" colspan="2" height="7"><img src="../../gfx/diverse/streg.gif"></td>
</tr>
<tr>
<td width="100%" colspan="2" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><b>Skift kode</b></td>
</tr>
<tr>
<td width="100%"><img src="http://www.mikze.dk/olemongolstyrer/gfx/diverse/streg.gif"></td>
</tr>
<tr>
<td width="100%">
<select name="profilmenu" style="width: 100%;" onchange="java script:location.href=this.value;">
<option value="egenprofil.php">Se profil</option>
<option value="retprofil.php">Ret profil</option>
<option value="skiftkode.php" selected>Skift Kode</option>
<option value="tagwall.php">Gæstebog</option>
<option value="top10.php">Top 10</option>
<option value="afstemning.php">Afstemning</option>
</select>
</td>
</tr>
<tr>
<td width="100%"><img src="http://www.mikze.dk/olemongolstyrer/gfx/diverse/streg.gif"></td>
</tr>
</table>
<?
if(isset($_POST[overskrift])) {
mysql_query("INSERT INTO topti (ejer, et, to ,tre, fire, fem, seks, syv, otte, ni, ti, overskrift) values ('$_POST[ejer]', '$_POST[et]', '$_POST[to]', '$_POST[tre]', '$_POST[fire]', '$_POST[fem]', '$_POST[seks]', '$_POST[syv]', '$_POST[otte]', '$_POST[ni]', '$_POST[ti]', '$_POST[overskrift]')") or die(mysql_error());
echo "<font color='green'>* Din top10 er nu blevet oprettet!</font>";
}
?>
</td>
</tr>
</table>
<?
} else {
echo "Du skal være logget ind for og kunne se denne side!";
}
?>
</body>
</html>
$@$@$@$@$@$ jeg har postet OVERSKRIFTEN HER som overskrift og så TEST1 TEST 2 osv. hele vejen ned... Dette melder den som fejl:
You have an error in your SQL syntax near 'to ,tre, fire, fem, seks, syv, otte, ni, ti, overskrift) values ('', 'Test1', 'T' at line 1
