se først på denne kode:
<?
session_start();
$conn = mysql_connect("localhost", "of?", "jajaja");
mysql_select_db("stat-bots-dk");
$resultat = mysql_query("SELECT * FROM demon_members WHERE level = '$level' and id = '$id'");
?>
<html>
<head>
<title>Welcome to Clan-Demon... Enjoy your stay...</title>
<link rel="stylesheet" type="text/css" href="css.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body bgcolor="#000000" text="#165280">
<div align="center">
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="700" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="80"><img src="billeder/logo2.gif" width="700" height="80"></td>
</tr>
<tr>
<td height="19" class="tp">
<div align="center">
<? include "menu.php" ?>
</div></td>
</tr>
<tr>
<td><table width="700" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" align="center" valign="top" bgcolor="#181818" class="menu">
<? include "login.php" ?>
</td>
<td width="10"> </td>
<td width="380" bgcolor="#181818" valign="top"><table width="360" border="0" align="center" cellpadding="0" cellspacing="0" valign="top">
<tr>
<td height="20"> </td>
</tr>
<tr>
<td valign="top">
<?
if(!isset($_POST['submit'])) {
echo "Du skal komme fra login.php";
}else{
$postbruger = $_POST['brugernavn'];
$postpass = $_POST['password'];
$resultat = mysql_query("SELECT * FROM demon_members WHERE brugernavn = '$postbruger' AND password = '$postpass'");
$row = mysql_fetch_array($resultat);
$number = mysql_num_rows($resultat);
if($number == 1) {
$_SESSION['loget_in'] = 1;
$_SESSION['brugernavn']=$postbruger;
$_SESSION['password']=$postpass;
$_SESSION['id']=$row["id"];
$_SESSION['level']=$row["level"];
echo ("<META HTTP-EQUIV=\\"refresh\\" CONTENT=\\"0;url=admin.php\\">");
}else echo"Du har indtastet forkerte oplysninger.. prøv igen! TAK";
}
?>
</body>
</html>
</tr>
<tr>
<td height="20"> </td>
</tr>
</table></td>
<td width="10"> </td>
<td width="150" align="center" valign="top" bgcolor="#181818" class="menu_right">
<? include "firstwar.php" ?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="20" class="top"><img src="billeder/bund.gif" width="700" height="20"></td>
</tr>
</table>
</div>
</body>
</html>
man logger ind det er ok og man bliver sendt videre hertiL som hedder admin.php:
<?php
session_start();
if(!$_SESSION['loget_in'] == 1) {
header("Location:
http://www.stat-bots.dk/demon/index2.php");
exit;
}
?>
<html>
<head> osv
spørgsmålet er så at hvorfor kan jeg komme ind på siden uden at logge ind?