Jump to content

Help with Sessions


Robeast

Recommended Posts

I am writing a few webpages that are using sessions.  I am passing usernames and passwords between the pages.  At the beginning of the pages I have an authorize function that checks the credential against a DB to check to see if the user has access.  When I am moving through the webpages everything works fine.  But when I hit back on the browser it tells me that the page has expired.  I am new to sessions.  Is there a way around this?

Here is the code (on all the pages) I have regarding the sessions.

<?
session_name("sessName");
session_start();

$user = $_SESSION['username'];
$passwd = $_SESSION['passwd'];

authorize($user, $passwd);
................................


Is there a session timeout I should extend?  I did some research and this kept coming up, but I wasn't sure if this was the fix or how to go about it.

Thanks in advance for any help or knowledge.
Link to comment
https://forums.phpfreaks.com/topic/32980-help-with-sessions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.