Jump to content


Photo

whoo sessions finnaly working quick question.


  • Please log in to reply
1 reply to this topic

#1 Demonic

Demonic
  • Members
  • PipPipPip
  • Advanced Member
  • 562 posts

Posted 21 September 2006 - 09:20 PM

<?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>
<? } ?>

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.

#2 BillyBoB

BillyBoB
  • Members
  • PipPipPip
  • Advanced Member
  • 630 posts

Posted 21 September 2006 - 10:20 PM

in this code do u have a part to check if the pass is correct if so then show me the part




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users