Jump to content

whoo sessions finnaly working quick question.


Demonic

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.