Jump to content


Photo

Question regarding sessions


  • Please log in to reply
3 replies to this topic

#1 holowugz

holowugz
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 20 April 2006 - 05:10 PM

Ok i have a few questions.

First of all i have two applications that run on my web server, and just as an experiment i logged into one of them, and then tried to acces a page on the other.
Now that is because the login system is practically identical and requires the same user permissions.

So techncially that is fine, but i want to make sure they log into each system first.

Now i was thinking if i created a table for each one called session.
and i stored teh session ID, User ID, Time, and IP.

and on each page as a secuirity check i just make sure that the current session ID exists in the database.

the information is entered upon login and deleted upon logout.

would that work?


#2 Darkness Soul

Darkness Soul
  • Members
  • PipPipPip
  • Advanced Member
  • 133 posts
  • LocationBrazil; São Paulo.

Posted 20 April 2006 - 05:19 PM

isn't simple you set different session names for each app? so, each app will use differente files to record sessions..

Never tested your idea, so, don't know.. ^^"

D.Soul
(If something is wrong, please tell me. I'm learning this language. Thank you)

#3 holowugz

holowugz
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 20 April 2006 - 05:21 PM

[!--quoteo(post=366902:date=Apr 20 2006, 06:19 PM:name=Darkness Soul)--][div class=\'quotetop\']QUOTE(Darkness Soul @ Apr 20 2006, 06:19 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
isn't simple you set different session names for each app? so, each app will use differente files to record sessions..

Never tested your idea, so, don't know.. ^^"

D.Soul
[/quote]

when you say session names, i assume you mean the variable names.

#4 Darkness Soul

Darkness Soul
  • Members
  • PipPipPip
  • Advanced Member
  • 133 posts
  • LocationBrazil; São Paulo.

Posted 20 April 2006 - 05:34 PM

I mean the function string session_name ( [string name] )..

when you start your session, use session_name( "app name" ) ; to secure the unique file.. ^~

Sorry for my mess english x)

D.Soul
(If something is wrong, please tell me. I'm learning this language. Thank you)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users