Otóż, po wpisaniu poprawnych danych nie przechodzi z index.php do index1.php. Poniżej wszystkie pliki:
index.php:
<?php
require_once('../INCs/config.php');
?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<meta name="Description" content="xxx" />
<meta name="Keywords" content="xxx" />
<meta name="Author" content="xxx" />
<title>xxx</title>
<link rel="stylesheet" type="text/css" href="style/css.css" />
</head><body bgcolor="#a2a2a2"><br /><center>
<div id="calosc">
<div id="gora"><div id="gorne">xxx</div>
<div id="header"></div><div id="stats"></div></div>
<div id="links">
xxx
</div>
<div id="top">
<div id="center">
<div id="screens"></div>
<div id="newslogowanie">
<div id="logowanie">
<div style="align: justify; width: 250px; font-family: tahoma;">
<?php include('includes/logowanie.php'); ?></div>
</div>
<div id="news"><?php include('news.php'); ?>
</div>
</div>
</div>
<div id="footer"></div>
</div></div><br /></center>
</html>
logowanie.php:
<?php
if(empty($_SESSION["zalogowany"]))$_SESSION["zalogowany"]=0;
function ShowLogin($komunikat=""){
echo "<form action='index1.php' method=post>"; echo "login:<input type=text name=login id=loginform><br>"; echo "hasԯ:<input type=password name=haslo id=loginform><br>"; echo "<input type=submit name=submit value=zaloguj id=loginform1></form>"; }
?>
<?php
if($_GET["wyloguj"]=="tak"){$_SESSION["zalogowany"]=0;echo "Zostales wylogowany z serwisu";}
if($_SESSION["zalogowany"]!=1){
if(!empty($_POST["login"]) && !empty($_POST["haslo"])){ $_SESSION["zalogowany"]=1;
$_SESSION["user_id"] = $_POST['login'];
}
else echo ShowLogin
("Podano zle dane!!!"); }
else ShowLogin();
}
oraz index1.php:
<?php
if($_SESSION["zalogowany"] != 1){
header("Location: index.php"); }
?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<meta name="Description" content="xxx" />
<meta name="Keywords" content="xxx" />
<meta name="Author" content="xxx" />
<title>xxx</title>
<link rel="stylesheet" type="text/css" href="style/css.css" />
</head><body bgcolor="#a2a2a2"><br /><center>
<div id="calosc">
<div id="gora"><div id="gorne">xxx</div>
<div id="header"></div><div id="stats"></div></div>
<div id="links">
xxx
</div>
<div id="top">
<div id="center1">
<?php
if($_SESSION["zalogowany"] == 1){
include('podstrony.php');
}
?>
</div>
<div id="footer"></div>
</div></div><br /></center>
</html>