you want the entire array assinged to one session value? or just one value from the array? ( secondly session(array()) wont work you need to assing a name and value to session )
like Session("firstname" = "joe"
I'm trying to create a shopping cart, so I want the all values in the array to be assigned to a session. My first asp page populate the multi-dim.. array.
So I have values in array, i.e. array(0,0) = name
array(0,1) = description
array(0,5) = image info (you helped me previously with that)
so in some later asp pages, i would like to refernce those values individually again. i.e. array(0,3)
hmmmm
perhaps it would be alot easier ( in mind and implementation ) to use a 'garbage' table, basically make a table to hold session values, then use the session("sessionid" to query it, then you can have a multitude of rows that you can retrieve ( and using getrows, pass it right back into an array mind you ) versus cluttering up the server memory with possibly large session values
but in answer to the question ...
Assigning :
Session("MyArray" = ArrayVar ' no quotes or anything pass the whole array to it
Fetching :
Dim MyVar
MyVar = Session("MyArray"
' not used to using this methodology you may have to use the following line to make it accept it properly
MyVar = Array(Session("MyArray"
but i would highly recommend using a temp values table .. or dumping the info to cookies, that way should the user accidentally close a window ( or have something like a popupkiller that somehow a product makes the page close ) that they dont lose all session info
Well eventually all this data will go into a table. I wish i had used tables from the begining, but i have spent so much time on multi-dimensional arrays, and populating them and then displaying them, that i would hate to do something different. You can take a look at
It isn't quite fully functional yet, but i'm getting there. one of my last steps is to do an order conformation page, sumerise everything ordered in shopping cart and then transfer data to access table.
Any other advise will be appreciated,
thanks
____________________________________________________
[sub]The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-2924[/sub]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.