Hello Friends..

i have 2 folder in root directory DEMO1 and DEMO2 containing same kind of files.

when i login in DEMO1 through localhost/demo1/index.php and it will direct me to welcome.php

and after login when i change demo1 to demo2 from address bar.. I Still remain in SESSION or welcome page.. instead of throwing to index page of DEMO2...

What should i do to ignore it.?


Regards

you can create a different session for demo2. On welcome of demo2 you can then do a check to see if the session belongs to demo 1 or 2

can you send us the main script of this code?

how can you create session esp. for different folder.?

my script is simple..

session_start();

if($_SESSION['user']!='')
{
echo "welcome";
}
else
{
header('location:welcome.com');
}

you might want to use $_SESSION and $_SESSION
or just use

on login page

<?PHP
$_SESSION['page'] = "demo1";
?>

on other pages

<?PHP
if (!($_SESSION['user'] && $_SESSION['page'] == 'demo1')){
header("Location: index.php");
?>

or something like that

Hello Friends..

i have 2 folder in root directory DEMO1 and DEMO2 containing same kind of files.

when i login in DEMO1 through localhost/demo1/index.php and it will direct me to welcome.php

and after login when i change demo1 to demo2 from address bar.. I Still remain in SESSION or welcome page.. instead of throwing to index page of DEMO2...

What should i do to ignore it.?


Regards

or you may use the syntax :
session_unset();

after your session from DEMO1. Ϋ

I think the problem is going from one demo to another.
you can't use session unset because you don't know when the user is going

I think the problem is going from one demo to another.
you can't use session unset because you don't know when the user is going

oooppps! sorry for that.
i assumed though that you are using a login and logout statement.

:$apology.

its okay! hey, I sent you a message kapatid :)

its okay! hey, I sent you a message kapatid :)

i already replied. :)

hehehe, And I replied again :3

hehehe, And I replied again :3

replied already. Ϋ