siden det drejer sig om er denne:
<?php require_once('../Connections/connect.php');
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['brugernavn'])) {
$loginUsername=$_POST['brugernavn'];
$password=md5($_POST['password']);
$MM_fldUserAuthorization = "rettighed";
$MM_redirectLoginSuccess = "indstillinger.php";
$MM_redirectLoginFailed = "login.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_connect, $connect);
$LoginRS__query=sprintf("SELECT brugernavn, passwd, rettighed FROM brugere WHERE brugernavn='%s' AND passwd='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $connect) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = mysql_result($LoginRS,0,'rettighed');
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<?php require_once('../connection/connect.php'); ?>
<html xmlns="
http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" / >
<title>4 Semestersprojekt</title>
<link href="/css/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%" align="center" class="layout" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" class="top"><img src="../<?php include('../include/img.php');?>" height="106px" /></td>
</tr>
<? //------------------------------- Topmenuer ----------------------------- ?>
<tr>
<td class="top1"> </td>
<td class="top1"><?php include('../include/bruger/topmenu.php'); //Inkludere hovedmenuen?></td>
</tr>
<? //------------------------------- Venstre menu -------------------------- ?>
<tr>
<td class="left"><br />
</td>
<? //------------------------------- Sideindhold --------------------------- ?>
<td class="middle">
<table width="90%" border="0px">
<tr>
<td>
<form id="login" name="login" method="POST" action="<?php echo $loginFormAction; ?>">
<table width="550" border="0" cellspacing="0" cellpadding="2">
<tr>
<td>Log På </td>
<td> </td>
</tr>
<tr>
<td>Brugernavn:</td>
<td><label>
<input name="brugernavn" type="text" id="brugernavn" size="70" />
</label></td>
</tr>
<tr>
<td>Password:</td>
<td><label>
<input name="password" type="password" id="password" size="70" />
</label></td>
</tr>
<tr>
<td> </td>
<td><label>
<input type="submit" name="Submit" value="log på" />
</label></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>