sign in


Forgot your password?


Why sign up?
- One account for five websites!
- Free access to Premium Codes
- Acess to cool web tools
- Ask and answer questions
- Stay ahead of other web developers
- and MUCH MORE!

Feel The Power

Php Code: Working with Sessions

Sessions are an important resource to save data on the server. This script shows their usage by a simple example.
In this example a random number is made and saved to a session; based on its value, a message is shown. If it is bigger than 5000, the 'ID' session is removed and the 'lottery' session is set to 'no'; otherwise it will be kept and 'lottery' session is set to 'yes'. Finally all data is removed.

If you don't know how to use this code or need more information Click here!

Online Users: 5
Total Online Users: 74
Recent Members: yuri , Ahmadullo, Ruqyahstor, Steven12345, dragoncitya
Twitter LinkedIn Youtube

Link to us:


Please put this code in your page.