RE: [PHP-DB] Session Question

2003-06-15 Thread Peter Monk
Graeme,

What version of PHP?

If you're using $HTTP_SESSION_VARS[] to store your variables
(if 4.0.6 or earlier) or $_SESSION[] (if later) you shouldn't
use session_register().

Peter.



-Original Message-
From: Boa Constructor [mailto:[EMAIL PROTECTED]
Sent: Sunday, 15 June 2003 3:50 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Session Question


Greetings all,

Now that my shopping cart is just about complete I've been working on
the
rest of the order process.

I have got two pages before finally placing an order.  The first page
takes
address details and the next page prints them all out with the contents
of
the shopping cart so the user can verify that they are correct.  I have
put
an "Edit" button on it so that the user can go back and change address
details.

The problem is this.  I am using sessions to store the address details
and
when the user clicks "Edit" the current details are printed out which is
expected.  When the user changes any of these details they aren't
recorded
in the session and so only the original values are recorded in the
session
and aren't overwritten or changed.

I have got calls to session_register(); for each variable on the address
details page and also on the confirmation page.

Any ideas?


Cheers,

Graeme :)


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Session Question

2003-06-14 Thread Boa Constructor
Greetings all,

Now that my shopping cart is just about complete I've been working on the
rest of the order process.

I have got two pages before finally placing an order.  The first page takes
address details and the next page prints them all out with the contents of
the shopping cart so the user can verify that they are correct.  I have put
an "Edit" button on it so that the user can go back and change address
details.

The problem is this.  I am using sessions to store the address details and
when the user clicks "Edit" the current details are printed out which is
expected.  When the user changes any of these details they aren't recorded
in the session and so only the original values are recorded in the session
and aren't overwritten or changed.

I have got calls to session_register(); for each variable on the address
details page and also on the confirmation page.

Any ideas?


Cheers,

Graeme :)


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Session Question

2001-12-12 Thread Russ Michell

I would add each item's unique item id to an array and pass the array as the session 
variable. Then 
use serialize($array) and unserialze($array) to pass the array from script to script. 
You could then
loop thru the array at the checkout and insert the vars into your database.

HTH
Russ

On Tue, 11 Dec 2001 13:22:26 -0800 Chris Payne <[EMAIL PROTECTED]> wrote:

> Hi there everyone :-)
> 
> I have a question about Session usage.  I am passing data from 1 page to another via 
>the toolbar 
> (Forgot the method name, sorry :-) and then when the client clicks on "Add to 
>shopping cart" it 
> adds it into a session to store the data for checkout or to continue shopping.  My 
>question is this:
> 
> When the client goes back and selects another item, it overrides the original in the 
>session - how 
> do I get sessions to be dynamic and assisn a different value for each shopping cart 
>entry?  And 
> then how do I retrieve them?
> 
> Thanks for your help, I have learnt so much from this group.
> 
> Chris

#---#

  "Believe nothing - consider everything"   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  Room 1C 'The Eastings' East Road, Cambridge
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam

  www.theruss.com

#---#


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Session Question

2001-12-11 Thread Chris Payne

Hi there everyone :-)

I have a question about Session usage.  I am passing data from 1 page to another via 
the toolbar (Forgot the method name, sorry :-) and then when the client clicks on "Add 
to shopping cart" it adds it into a session to store the data for checkout or to 
continue shopping.  My question is this:

When the client goes back and selects another item, it overrides the original in the 
session - how do I get sessions to be dynamic and assisn a different value for each 
shopping cart entry?  And then how do I retrieve them?

Thanks for your help, I have learnt so much from this group.

Chris