I love the null-coalescing operator because it makes it easy to assign a default value for nullable types.
Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Monday, June 11, 2012
What is the proper way to check for null values?
Tuesday, May 29, 2012
How do I expire a PHP session after 30 minutes?
I need to keep a session alive for 30 minutes and then destroy it.
Sunday, May 20, 2012
What are the risks of PHP sessions?
So everyone says that sessions have security risks, I want to know what kind of risks are these? What can hackers do with sessions?
Friday, May 18, 2012
How to properly handle session and access token with Facebook PHP SDK 3.0?
In the PHP 3.0 SDK there is no getSession() or any session handling from outside the Facebook api available. Some days ago the developers of facebook have also somehow updated the JavaScript sdk, according to this blog entry and this bug report .
Tuesday, May 15, 2012
Has anyone created a PHP Session-like class in user code (not native)?
The native PHP Session functionality is great, but it's ultimately a singleton. There are times when you need to maintain state for multiple apps and in the scope of an already-started session (e.g. in an app framework). Technically one can stop/restart a session after changing session_name() , but this is impractical/impossible/unsafe within most apps. Using a shared session.save_path is also not an option if one app stores session data with a non-disk adapter.
Sunday, May 13, 2012
Why jquery ajax not sending session cookie
I am getting logged out when I send request by ajax in a login session. I check headers sent by FireBug and show there was not cookie
Wednesday, May 9, 2012
Few questions about PHP sessions
I have a few a few question about php sessions:
-
Since the default value forsession.gc_maxlifetimeis 24 mins then that means any session file that isn't modified for 24 mins will be deleted and the session will expire automatically.
Monday, May 7, 2012
$_SESSION created but theres no PHPSESSID in $_SERVER
I'm experiencing some weird problems with SESSION variables on my PHP/Ajax online shopping cart.
Thursday, April 19, 2012
Proper way to use "Remember me” functionality in PHP
Short
Working on login system and trying to implement remember me feature.
Thursday, April 12, 2012
Looping Through All a Server"s Sessions in PHP
Is there a way in PHP to get a list of all sessions (and the variables within each) on the server?
Monday, January 30, 2012
what this error is due to session_start
My hosting sent me email saying
Does storing large sessions slow down response time and server
I am in the process of creating a Facebook App for my website which includes functionality that requires the users friends list.
Sunday, January 29, 2012
Keep php session from expiring when browser is quit
I'm working with a PHP session. It's working nicely, except if I quit my browser and then return to the webpage, the session has expired. How can I prevent this/set an expiration time for the session?
How to increase the number of something using sessions?
I want the session increase more number every time I click on a button. The problem is I can not get it to increment. Seemed like it get the same value all the time. The script is below.
PHP - Destroy session if not any action in 10 minutes
Is there any option to destroy a session if user does not perform any action in 10 minutes?
Monday, January 16, 2012
Custom session handler in php using db
I am having problem with implementing custom session handler in php. The code: http://pastebin.com/9QV9f22Q
Friday, January 13, 2012
Do I need to write a custom session class for CodeIgniter?
I cannot seem to get CI's session library to function the way I want it to. Essentially, I am storing 2 different categories of data within the sessions. The data within the 2 categories may contain the same value. Right now my attempt to add a key => value pair to the session is failing, as it is only allowing 1 key => value pair to be associated with the array. It overrides itself each time I do a post.