|
|
|
|
|
|
| |
Introduction
If you were programming a user authorization system for your website, then you would use a session or a cookie to pass data. A session would store the data on the server and reference it by a unique key or ID. As your members browse through the member pages, his/her data could be displayed or used by fetching that data. Alternatively, you could use a cookie that stores the data on the users’ computer. Fetching the data from the cookie would be similar to a session except you use the cookie name: PHP handles the actual retrieval and sorting of the cookie data.
PHP's session handling functions are OK, but what if you wanted to create your own sessions? In this article I will teach you how to create and maintain your own customized sessions. You will have complete control over how your session handles the data and how it fetches the data to make it available in your scripts.
This is very useful because you can track users' IP addresses and other information you can grab with PHP. There are many more advantages to creating your own sessions as compared to using PHP's built-in session handing functions.
In this tutorial I will assume the following things:
- You have PHP4+ and MySQL installed on your server.
- You have strong PHP and MySQL skills.
- You know object-oriented programming for PHP.
Anyhow, let's get started and work those customized PHP sessions!
Read More... |
|
| |
| The Quickest Way To Count Users Online With PHP Categories : PHP, Sessions | | | PHP 101 Part 10 of 15 : A Session In The Cookie Jar Categories : PHP, Beginner Guides, Cookies, Sessions | | | PHP for Beginners by a Beginner: Simple Login, Logout, and Session Handling Categories : PHP, Sessions, Authentication | | | Building a PHP Style Switcher Categories : PHP, Sessions, Personalization and Membership | | | Exploring Session Security In PHP Web Applications Categories : PHP, Security, Sessions, Web Applications | | | Working with Dates and Times in PHP Categories : PHP, Date Time | | | Date Arithmetic With MySQL Categories : PHP, Databases, MySQL, Date Time | | | PHP CLI and Cron Categories : PHP, CLI, Cron | | | Saving Images in MySQL Categories : MySQL, PHP, Graphics, Databases | | | Aspect-Oriented Programming and PHP Categories : PHP, Aspect Oriented Programming | | | Beginners guide to PHP and MySQL Categories : PHP, Beginner Guides, Databases, MySQL, Installation | | | Building XML Web Services with PHP NuSOAP Categories : PHP, NuSOAP, XML | | | Who's Linking? Categories : PHP, Beginner Guides, To PHP | | | Building a Counter Categories : PHP, Cookies | | | Building A Persistent Shopping Cart With PHP and MySQL Categories : PHP, MySQL, Databases, Ecommerce | |
| |
|
|