Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 7th, 2005, 11:08 PM
Registered User
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pro PHP5, Ch.15, Class file usage

Hi Everyone,

I'm new and hoping there are brilliant PHP coders out there to help me. I'm trying to include class files and object oriented coding in my stuff. I want to replace my present login and session management system with class files. I'm using "usersession.phpm" from chapter 15 in Professional PHP5, and a MySQL database. My first problem is my host is not up to PHP 5 yet, so I've modified the file to work with PHP 4.

I'm feeling pretty stupid since I can't seem to figure out how to implement the class. I understand how to instantiate the class and I understand that a class must be passed around to each page that needs it. Where I'm stumped is, since this is a session class, how and where do I pass it. Each time I include it in a new page, I get a new session or at least the user class I passed is lost.

Can someone please help me to grasp this concept?



Similar Threads
Thread Thread Starter Forum Replies Last Post
php5 chap 15 help needed twr Beginning PHP 1 January 5th, 2008 06:20 AM
pro php5 full source code jontywagener Pro PHP 3 November 1st, 2007 01:33 AM
Pro PHP5 code missing jontywagener BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 0 September 16th, 2007 06:56 AM
Pro PHP Chap 15 kgmcmillen Pro PHP 1 April 20th, 2006 02:38 PM
Professional PHP5 Ch. 15 Custom Session Handler superrobotpope Pro PHP 4 February 4th, 2005 08:32 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.