![]() |
|
#1
|
|||
|
|||
Session array not updatingHello everyone,
i am trying to build a simple online shopping cart. Been strugling with 2 dimensional sessions array and when i finally got it working the session array is not updating. I want to be able to browse through each product page and keep adding the productid,quantity to $_session[cart]. But each time i add to cart the previous product ids and quantities are deleted from the session. Am i doing it correctly. Somebody please help.Thanks in advance. Code: PHP Code:
Thanks in Advance Last edited by LuciWiz : 19-Dec-2009 at 04:12.
Reason: Please insert your Php code between [php] & [/php] tags
|
|||
|
#2
|
||||
|
||||
Re: Session array not updatingFrom page to page, there should be a call to session_start(), or else the information will be lost between page transitions.
Typically, that function is at the top of each page where session use is involved. See this PHP api reference for more info. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: Session array not updatingQuote:
Thanks for suggetion |
Recent GIDBlog
Install Adobe Flash - Without Administrator Rights by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| where is the problem and can you fix it (php) | oggie | MySQL / PHP Forum | 8 | 14-Apr-2008 15:08 |
| Getting a line error in register | oggie | MySQL / PHP Forum | 5 | 13-Apr-2008 16:16 |
| What is an array? | Howard_L | C Programming Language | 3 | 05-Oct-2007 05:11 |
| How to sort in C++ alphabetically | wilen | C++ Forum | 5 | 20-Apr-2007 14:43 |
| Need help deleting the last element in the array | headphone69 | C++ Forum | 2 | 15-Mar-2006 19:31 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The