X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 4389ED1B188 for ; Wed, 19 May 2004 18:09:32 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 11945-01 for ; Wed, 19 May 2004 18:09:13 -0300 (ADT) Received: from mta0.beanfield.net (mta0.beanfield.net [66.207.192.6]) by svr1.postgresql.org (Postfix) with ESMTP id 149C2D1B1BD for ; Wed, 19 May 2004 18:09:11 -0300 (ADT) Received: from [192.168.205.247] (gw2tor1nat161.beanfield.net [66.207.192.161] (may be forged)) by mta0.beanfield.net (8.12.11/8.12.6) with ESMTP id i4JL99MB041064 for ; Wed, 19 May 2004 17:09:09 -0400 (EDT) (envelope-from lynna@gallery44.org) User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022 Date: Wed, 19 May 2004 17:15:19 -0400 Subject: Re: Sessions and serializing (was: Checking data inserted From: Lynna Landstreet To: Message-ID: In-Reply-To: <000301c43879$fb8ff390$0d00a8c0@chris> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/37 X-Sequence-Number: 2756 Hmmm, so my entire idea for how to do this appears to have been unsound. Well, better to find that out sooner than later! Thanks to everyone who replied. But I have a few questions: on 5/12/04 7:36 PM, Chris at chris@interspire.com wrote: > You could serialize up the data in sessions and then use that data > before adding it to the database. > See http://www.php.net/serialize and http://www.php.net/unserialize and > http://www.php.net/session OK, so if I understand this correctly, the serialize function can take something like a big associative array containing all the data I want to be able to write into the database and condense it into a single object that can be passed via a hidden form field or something to that effect, correct? Or the data can be put into the session array using $_SESSION, and then passed by using a $session_id in the page URL? But according to one of the user comments in the manual I have to use addslashes() and stripslashes() if I want to be able to put the data into the database after unserializing it - is that right? Also, what about character encoding? My database and my web pages are utf-8 because of the presence of special characters in some of the artists and names and image and exhibition titles (it's a Canadian gallery, so there are a lot of French artists). Will serializing the array containing the data affect that in any way? Sorry if I'm being a pest - the whole session thing is new to me and I want to make sure I understand it correctly. Thanks, Lynna -- Resource Centre Database Coordinator Gallery 44 www.gallery44.org