Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Php And Session, Talk about Session Handling in PHP
thedevil
post Jul 29 2005, 06:55 AM
Post #1


Member - Active Contributor
Group Icon

Group: Members
Posts: 82
Joined: 17-November 04
Member No.: 1,392



I have a problem in handling Session. When I log on to my site using the passwords and username that i have maintained in my database... After authentication, I start a session... but still when i again visit the admin page it asks me the username and password... I have added all the authentication and checking...
Go to the top of the page
 
+Quote Post
wanhafizi
post Jul 29 2005, 12:42 PM
Post #2


Advanced Member
Group Icon

Group: Members
Posts: 145
Joined: 13-December 04
Member No.: 1,734



Please make your code avaliable to others so that we can analyze it.
Go to the top of the page
 
+Quote Post
Houdini
post Jul 30 2005, 10:59 PM
Post #3


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



It sounds like it is a database problems and not a session problem, have you optimised your database, or looked at it and be sure that the authors table is correct?
Go to the top of the page
 
+Quote Post
Hercco
post Aug 1 2005, 04:09 PM
Post #4


Super Member
Group Icon

Group: Members
Posts: 595
Joined: 4-September 04
Member No.: 228



How do you transfer the session id? Do you use cookies, have cookies as optional or rely completely on GET variable?

And do you save the session id into database and check it from there?


Oh and your code would be helpful too. Just explain it or have it properly commented.
Go to the top of the page
 
+Quote Post
thedevil
post Aug 9 2005, 07:59 AM
Post #5


Member - Active Contributor
Group Icon

Group: Members
Posts: 82
Joined: 17-November 04
Member No.: 1,392



QUOTE(Hercco @ Aug 1 2005, 09:39 PM)
How do you transfer the session id? Do you use cookies, have cookies as optional or rely completely on GET variable?

And do you save the session id into database and check it from there?
Oh and your code would be helpful too. Just explain it or have it properly commented.
*



actually I dont pass the session id in to pages but rely on get... moreover... i use code as such

CODE
session_start();
$_SESSION['<somevariable>']='someting';

and use this variable to see if the person has logged in or not... as
CODE


session_start();
$_SESSION['logged']=true;

in some other pages
CODE

if (isset($_SESSION['logged'])&&$_SESSION['logged'])
{
//Some codes
}
else
{
// other codes
}


Is this all right or am I just making it feel stupid...
please tell me better way to handle sessions and with code if any
Thank you

QUOTE(Hercco @ Aug 1 2005, 09:39 PM)
How do you transfer the session id? Do you use cookies, have cookies as optional or rely completely on GET variable?

And do you save the session id into database and check it from there?
Oh and your code would be helpful too. Just explain it or have it properly commented.
*


HeLp me know about session id and its uses how to pass session id into pages... i have seen PHP self passing id through PHPSESSID in GET variable... how will I save the Session id??? and use it later on...
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Php, Sql Lite: Storing Session's Data?(1)
  2. Need Help - How To Remove Session ID From URL(6)
  3. User Authentication Session Handling Problems(14)
  4. Already Sent Session Cookies?(2)
  5. Php Session Problem(7)
  6. Run A Script When Expires A Session(6)


 



- Lo-Fi Version Time is now: 22nd November 2008 - 04:39 PM