close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

User id not set sometimes but fine sometimes too

Thread began 1/22/2010 8:20 am by neil.batchelor254136 | Last modified 3/23/2010 5:37 pm by neil.batchelor254136 | 2262 views | 21 replies

Eric Mittman

I think it would be best to move away from cookies and keep all of this server side. The best replacement for the cookies is using session variables to hold the details of the user. When the user logs in you should store their userID in a session variable then use this variable wherever you need the id of the user.

If clicking on the back button is clearing the session then there is a problem with session management. A session variable should remain intact throughout the life of the session, either until it expires or the user closes their browser. If you are having the session cleared when going from page to page then this is a major problem.

To check on the settings for your session you can create a phpinfo page. To make this page just create a new php page with this line of code in it:

php:
<?php phpinfo(); ?>



When you view this page look for these settings:

session.save_handler should be set to: files
session.save_path should be set to a folder on the server that you have access to
session.use_only_cookies this should be set to Off

As a test of this try using the following two page test attached to this post. You should go to the session_test.php page first and see the session information there. Then click on the link to the other test page, it should display the same session information for you there. If it does not then there is problem with the session that needs to be addressed. Post back and let us know what you discover.

Attached Files
session_test2.zip

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...