Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
| Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To 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
  #1 (permalink)  
Old June 9th, 2003, 04:28 PM
sam sam is offline
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Session Handling

Hi all,
1) On page 222 it has a function db_error_message() is this an internal PHP function or was it supposed to be written b/c I'm getting the error: Fatal error: Call to undefined function: db_error_message() in /usr/htdocs/php/handler.php on line 99

2) Does anybody have a "default" session handling example they can point me to, (why did the author use a db anyway)?
Thanks,
Sam
__________________
~~~~~~~~~~~~~~~~~~~~~~~
       http://ebcpro.com.com
      where EveryBusinessCounts
~~~~~~~~~~~~~~~~~~~~~~~
  #2 (permalink)  
Old June 19th, 2003, 03:10 PM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

db_error_message() is a user-defined function. If you copied that code out of the book, then that function should also be defined in that book somewhere.

Here's a simple session example:

Code:
<?php
session_start();

if (!isset($_SESSION['count']))
{
   $_SESSION['count'] = 0'
}

echo "You've seen this page " . ++$_SESSION['count'] . " time(s).\n";
?>

Take care,

Nik
http://www.bigaction.org/


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML handling using C# tusharkale C# 11 June 20th, 2008 09:19 AM
session handling meenakshi.sharma84@gmail. PHP How-To 1 April 12th, 2006 03:08 AM
erron handling garrydawkins SQL Server 2000 1 April 10th, 2006 03:44 PM
session and cookie problem (empty session file) msincan BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 27th, 2005 05:31 PM
Custom session handling dimitri p Pro PHP 2 July 31st, 2003 02:23 PM





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