i have a problem, can't understund anyway.
i have three files - index.php
, admin.php
, post.php
in index.php
i have
<?
session_start();
$_SESSION['login11_error'] = 'yes';
if(verifying username and password here, if they correct)
{
$_SESSION['login11_error'] = 'no';
header('Location: admin.php');
}
?>
in admin.php
i have
<?
session_start();
<form action="post.php" method="post">
...
?>
and finaly in post.php
<?
session_start();
some functions here...
header("location:admin.php");
?>
but when it redirected to admin.php
from post.php
it lose the value of $_SESSION['login11_error']
.
any ideas?
Thanks...
UPDATE
fixed.
because i just show the structure of script here, i have a mistake in my question.
post php is in another folder, then index.php and admin.php, it's in /folder1/folder1_1/post.php
in post.php i was writing header('Location: http://bs.am/admin.php")
and when i change it to header('Location: ../../admin.php")
it start working.
incomprehensible behavior for me, but works:)