0

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

5
Contributors
13
Replies
14
Views
6 Years
Discussion Span
Last Post by ﻼim
0

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

0

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');
}

Edited by sam023: n/a

0

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

0

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. Ϋ

Edited by ﻼim: missing letter again. Ϋ

0

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

0

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.

0

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

i already replied. :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.