hi
i will make the control panel for any web ok
but i canot make 2 part on one page by using this tag
<frames>
i try most to make this idea but canot work good , because when i sign out from main page of control panel we sign out for only one part of page why ??
code the control panel
index.php
<?
session_start();
include("doctorrole.php");
if($_POST["btnSignOut"]){
session_destroy();
header("location:../login.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>
<MMString:LoadString id="insertbar/php/output" />
</title>
<!-- Copyright 2001, 2002, 2003 Macromedia, Inc. All rights reserved. -->
<!-- Copyright 2001, 2002, 2003 Macromedia, Inc. All rights reserved. -->
</head>
<body>
<form action="index.php" method="post" name="form1" id="form1">
<p><strong> Welcome in Default Doctor Page </strong></p>
<p>
<? echo $_SESSION["name"]; ?>
</p>
<p>
<input name="btnSignOut" type="submit" id="btnSignOut" value="Sign Out" />
</p>
</form>
</body>
</html>
doctorrole.php
<?
session_start();
if($_SESSION["role"] !="doctor"){
header("location:../login.php");
}
?>
login.php
<?
include_once("../DBAccess.php");
session_start();
if(isset ($_POST["txtUname"]) and isset($_POST["txtPassword"])){
// not new vistor (user submit the Page)
if(IsValidUser($_POST["txtUname"],$_POST["txtPassword"])){
$_SESSION["login"]="true";
$_SESSION["name"]=$_POST["txtUname"];
$_SESSION["role"]=GetAccountType($_POST["txtUname"]);
if($_GET["return"]!="")
header("location:".$_GET["return"]);
else if($_SESSION["role"]=="admin")
header("location:admin/");
else if($_SESSION["role"]=="doctor")
header("location:doctor/");
else
header("location:client/");
echo $_GET["return"];
}
else{
$message="Invalid Username or Password.";
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login Form</title>
<style type="text/css">
<!--
.style1 { font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: large;
}
.style2 {font-size: x-small}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<table width="300" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><div align="center"><span class="style1">Login Form</span></div></td>
</tr>
<tr>
<td></td>
<td><font color="#FF0000"><? echo $message; ?></font></td>
<td></td>
</tr>
<tr>
<td>User name: </td>
<td><input name="txtUname" type="text" id="txtUname" /></td>
<td> </td>
</tr>
<tr>
<td>Password:</td>
<td><input name="txtPassword" type="password" id="txtPassword" /></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><label for="checkbox"></label></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><input name="btnLogin" type="submit" id="btnLogin" value="Login" /></td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>