dat van die lijnen, zoek eens uit hoe divs werken ipv frames.
en van die session, post ff wat relevante code
Link gekopieerd
// home.php
<?php
session_start();
error_reporting(E_ALL);
include('databaseconnectie.php');
echo"<link href='style.css' style='text/css' rel='stylesheet'>
<body>
";
$gebruikersnaam = $_SESSION['gebruikersnaam'];
$gegevens = mysql_query("
SELECT
g.gebruikersnaam,
g.club_id,
g.crew_id,
g.voornaam,
g.achternaam,
g.gebruiker_id,
g.staff_level,
g.site_level,
cr.crew_id,
cr.crew_naam,
cl.club_id,
cl.club_naam
FROM
gebruikers AS g,
crews AS cr,
clubs AS cl
WHERE
(g.club_id = cl.club_id OR g.club_id =NULL) AND
(g.crew_id = cr.crew_id OR g.crew_id=NULL )AND
g.gebruikersnaam = '".$gebruikersnaam."'
")or die(mysql_error());
$res = mysql_fetch_assoc($gegevens);
echo '<br>
<table border="0">
<tr><td>'.$_SESSION['gebruikersnaam'].'</td><td>
</td></tr>
<tr><td>'.$res['voornaam'].'</td><td>
</td></tr>
</table>';
echo mysql_num_rows($gegevens);
?>
// login.php
<?php
error_reporting(1);
include('databaseconnectie.php');
session_start();
echo"<link href='style.css' style='text/css' rel='stylesheet'>
<body>
";
function print_formulier()
{
echo"
<form action='login.php?login=1' method='POST'>
<table>
<tr><td width=170>Gebruikersnaam:</td><td>
<input type='text' name='gebruikersnaam'>
<tr><td width=170>Password:</td><td>
<input type='password' name='wachtwoord'>
<tr><td width=170></td><td><input type='submit' name='submit' value='Inloggen'></td></tr>
</table>
";
}
if(isset($_GET['login']))
{
$gebruikersnaam = mysql_real_escape_string($_POST['gebruikersnaam']);
$wachtwoord = md5($_POST['wachtwoord']);
$sql = mysql_query("
SELECT
gebruikersnaam,
voornaam,
achternaam,
wachtwoord,
site_level
FROM
gebruikers
WHERE
gebruikersnaam = '". $gebruikersnaam . "'") or die(mysql_error());
$res = mysql_fetch_assoc($sql);
if($res['wachtwoord'] == $wachtwoord)
{
$_SESSION['gebruikersnaam'] = "$gebruikersnaam";
$_SESSION['sitelevel'] = $res['sitelevel'];
echo"Je bent nu ingelogd.
<meta http-equiv='refresh' content='2, URL=layout/tussen.html'>
";
}
}
if(!isset($_GET['login']))
{
print_formulier();
}
if(isset($_GET['login']))
{
if($_GET['login'] == "loguit")
{
unset($_SESSION);
session_destroy();
echo"Je bent nu uitgelogd.
<meta http-equiv='refresh' content='2, URL=layout/tussen.html'>
";
}
}
?>
zoals je ziet wordt je na het in en uitloggen doorgestuurd naar layout/tussen.html
// tussen.html
<frameset cols="15%,85%" border="0" frameborder="0" framespacing="0" marginheight=0 marginwidth=0>
<frame src="../menu.php" border="0" scrolling="no" frameborder="0" framespacing="0" marginheight=0 marginwidth=0>
<frame src="../home.php" border="0" scrolling="no" frameborder="0" name="home" framespacing="0" marginheight=0 marginwidth=0>
</frameset>
Link gekopieerd