Re: Sessions and serializing (was: Checking data inserted

From: Lynna Landstreet <lynna(at)gallery44(dot)org>
To: <pgsql-php(at)postgresql(dot)org>
Subject: Re: Sessions and serializing (was: Checking data inserted
Date: 2004-05-19 21:15:19
Message-ID: BCD146A7.12C2%lynna@gallery44.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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(at)interspire(dot)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

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Chris 2004-05-20 02:46:54 Re: Sessions and serializing (was: Checking data inserted
Previous Message Paul Lynch 2004-05-19 04:59:24 Re: Parsing Data, Table to Form