Jump to content

Archived

This topic is now archived and is closed to further replies.

Demonic

whoo sessions finnaly working quick question.

Recommended Posts

[code]
<?php session_start(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
  "http://www.w3.org/TR/html4/frameset.dtd">
<HTML>
<HEAD>
<TITLE>Admin Control Panel</TITLE>
</HEAD>
<?php
include "config.php";
if($logged[level] != 5){
echo "You do not have access to this page";
exit();
}
?>
<?php
$result = mysql_query("SELECT * FROM users WHERE username='$acpuname' ");
$true = mysql_fetch_array($result);
$acpuname = no_injection($_POST['username']);
$password = md5($_POST['password']);

$_SESSION['username'] = $_POST['username'];
if(!isset($_SESSION['username'])){
echo "<form method='post'><input type='text' name='username'><br><input type='password' name='password'><br><input type='submit' name='setsession' value='Set Session'></form>";
}elseif(isset($_SESSION['username'])){
?>
<frameset rows="20%,80%" border="0">

<frame src="acpb.php" noresize="noresize" border="0">

<frameset cols="25%,75%" border="0">
<frame src="content.php" noresize="noresize" border="0">
<frame src="admin.php" name="showframe" noresize="noresize" border="0">
</frameset>

</frameset>
</HTML>
<? } ?>
[/code]

That code works perfectly like IPB almost

I know how to check for password lolz but how can i make the session close if passwords are not correct like you see how i got it to check if session is thier? Well Im trying to make it so when you login and password isnt Correct the session returns false.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.