WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this Article to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES SUBMIT AN ARTICLE PRINT
Title : Developing Custom PHP Sessions
Categories : PHP, Sessions
devarticles
devarticles
Date : 2002-07-23
Grade : 0 of 5 (graded 0 times)
Viewed : 4447
Search : More Articles by devarticles
Action : Grade This Article
Tools : My Favotite Articles


Submit your own code examples 
 


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...









Exploring Session Security In PHP Web Applications
Categories : PHP, Security, Sessions, Web Applications
Building a PHP Style Switcher
Categories : PHP, Sessions, Personalization and Membership
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
The Quickest Way To Count Users Online With PHP
Categories : PHP, Sessions
A Useful Event Calendar Written In PHP
Categories : PHP, Date/time, Calendar
Saving Images in MySQL
Categories : MySQL, PHP, Graphics, Databases
Database Abstraction with PEAR
Categories : PHP, Pear, Databases
Aspect-Oriented Programming and PHP
Categories : PHP, Aspect Oriented Programming
How To add paging (Pagination) with PHP and MySQL
Categories : PHP, Beginner Guides, Databases, MySQL, HTML and PHP
Simple Connection to Oracle with PHP
Categories : PHP, Oracle, Databases
Making PHP Forms Object-Oriented
Categories : PHP, HTML and PHP, Object Oriented
Custom Error Messages When Using $PHP_SELF as Form Action
Categories : PHP, PHP Configuration
More PHP, XML and XSL for Wireless Content
Categories : PHP, XML, XSL, Wireless
Watching The Web
Categories : PHP, Databases, MySQL, HTTP, MD5