i'm building a small CMS to be integrated with a third party shopping cart... this CMS is a bridal registry, with admin and public pages. the admin adds products to a bridal registry using the admin pages... then, the public can view a registry that has products that the admin pulled from the shopping cart database... and then purchase an item from the registry.
the difficulty involved comes from how crazy this third party shopping cart is... it's extremely difficult to work with, and confusing... it's weird, when you click 'Add to cart', you are taken to the shopping cart page, and the correct item is in the cart... but NONE of the rest of the information gets sent (unique id's, registry id's...ect...). it's so weird i have no idea how to make it work... so, i was thinking about FORCING information to be sent from page to page... then i came across sessions...
i guess what i'm asking is can sessions help my current situation? i just need to pass along a few values for a few variables for each individual public user... i'm pretty sure sessions can do this for me, but i have no idea where to start.. does anybody have any tips, code examples, explanations, anything that can get me on my way??? thanks in advanced.
-boo
questions about sessions...
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Read the manual on sessions. Then look at session_start() and go from there.
thanks roopurt. i was wondering, is it possible to have a nested session array? for instance... if i have multiple values for $_SESSION['price']... is it possible to add an index to this session? or would i be adding on an index to the array $price, and then storing the $price array as a session array $_SESSION['price']?
$price = array(12, 41, 15, 22, ... ect...);
$price = array(12, 41, 15, 22, ... ect...) ... add another index to the array....
$_SESSION['price'] = $price
is this possible?
$price = array(12, 41, 15, 22, ... ect...);
$price = array(12, 41, 15, 22, ... ect...) ... add another index to the array....
$_SESSION['price'] = $price
is this possible?
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Try it.boo_lolly wrote:thanks roopurt. i was wondering, is it possible to have a nested session array? for instance... if i have multiple values for $_SESSION['price']... is it possible to add an index to this session? or would i be adding on an index to the array $price, and then storing the $price array as a session array $_SESSION['price']?
$price = array(12, 41, 15, 22, ... ect...);
$price = array(12, 41, 15, 22, ... ect...) ... add another index to the array....
$_SESSION['price'] = $price
is this possible?
- evilchris2003
- Forum Contributor
- Posts: 106
- Joined: Sun Nov 12, 2006 6:43 am
- Location: Derby, UK