<?php
session_start();
?>
<!DOCTYPE html
public "-//W3C//DTD XHTML 1.0 strict //EN"
"http://www.w3.org/TR/xhtmll/DTD/xhtmll-strict.dtd">
<html>
<head>
<title> sending you back... </title>
</head>
<body>
<?php
include ("connect.php");
$password = ($_POST["password"]);
$query = "select * FROM docenten
WHERE usersname = '{$_POST['usersname']}'
AND password = '".$password."'";
$result = mysql_query($query, $db) or die('the query failed');
if (mysql_num_rows($result) > 0)
{
$rij = mysql_fetch_array($result, $query);
echo $rij['usersname'];
$_SESSION['usersname']= $_POST['usersname'];
$_SESSION['role'] = $_GET['role'];
$inlogegevens;
session_write_close();
header("location: index.php");
}
else
{
//shows a error box and sends us back
}
</body>
</html>
So the major issue here is that my role never gets a value.
and i've tried about everything i know to fix it ;(




Help










