multiple sessions
Moderator: General Moderators
-
Sneha Reddy
- Forum Newbie
- Posts: 5
- Joined: Fri Dec 09, 2005 11:57 pm
multiple sessions
Hi all,
This is very urgent. I need help!!!
I need to instantiaite a pop-up window from PHP script and pass an array values from PHP script to the window.
the user selects some of them from a list of those array values(say they are in a multiple select list box) and the values are again sent back to the parent script. Here the problem is: I need to instantiate the pop-up window multiple times from the PHP script (that means multiple sessions).
Is it possible? let me know please.
Thank You
Sneha
This is very urgent. I need help!!!
I need to instantiaite a pop-up window from PHP script and pass an array values from PHP script to the window.
the user selects some of them from a list of those array values(say they are in a multiple select list box) and the values are again sent back to the parent script. Here the problem is: I need to instantiate the pop-up window multiple times from the PHP script (that means multiple sessions).
Is it possible? let me know please.
Thank You
Sneha
-
Sneha Reddy
- Forum Newbie
- Posts: 5
- Joined: Fri Dec 09, 2005 11:57 pm
Array keeps changing
Hi the array values keep changing
like my $_SESSION['myArray'].....here "myarray" keeps changing in the recursive function.
Thank You
Sneha
like my $_SESSION['myArray'].....here "myarray" keeps changing in the recursive function.
Thank You
Sneha
-
Sneha Reddy
- Forum Newbie
- Posts: 5
- Joined: Fri Dec 09, 2005 11:57 pm
yes but....
There is a recursive function in the script...in which there is an array 'myarray'.
every time the function is called we get new values into it. Based on them we have to generate a pop-up window which shows all the values of that array in it and the user has to select some. these some values should be sent back to the parent script.( Do i have to use java script), beacause to pop-up windows from PHP you were saying i need java script. I am new to PHP, so this is a bit confusing to me.
My question is every time i get new values into an array how do I store them in a session....Patrick said something about assigning a key. Can you just help me with it.
Hope this is clear.
Thanks
Sneha
every time the function is called we get new values into it. Based on them we have to generate a pop-up window which shows all the values of that array in it and the user has to select some. these some values should be sent back to the parent script.( Do i have to use java script), beacause to pop-up windows from PHP you were saying i need java script. I am new to PHP, so this is a bit confusing to me.
My question is every time i get new values into an array how do I store them in a session....Patrick said something about assigning a key. Can you just help me with it.
Hope this is clear.
Thanks
Sneha
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
lets say you had an array "myarray"
and I wanted to store this array as a session
and to access the array
hope that clears things up
Code: Select all
$myarray = array(
'key1' => 'value1',
'key2' => 'value2',
);Code: Select all
$_SESSION['myarray'] = $myarray;Code: Select all
echo $_SESSION['myarray']['key1']; //outputs value1-
Sneha Reddy
- Forum Newbie
- Posts: 5
- Joined: Fri Dec 09, 2005 11:57 pm
Thanks for the reply Jcart,
This is where my problem is . I am using indexed arrays here. How can I initiate java script from PHP. And how do I access them in my pop-up window?
Like every time we want to initiate a pop-up window, can we access the array elements as
_SESSION ['myarray']['key1'] ?
hope I am not asking silly questions.
Thanks a lot
This is where my problem is . I am using indexed arrays here. How can I initiate java script from PHP. And how do I access them in my pop-up window?
Like every time we want to initiate a pop-up window, can we access the array elements as
_SESSION ['myarray']['key1'] ?
In my function I have an array 'myarray' with the elements ['she','he','we'] i need to to initiate a pop-up window and the user has to select she and he from the above . and the he and she has to be passes back to the parent script..
Again when the function is called the array element contents change ['pen','paper','book'....] and the same procedure repeats. This goes on and on till some condition is satisfied in the function
hope I am not asking silly questions.
Thanks a lot
-
Sneha Reddy
- Forum Newbie
- Posts: 5
- Joined: Fri Dec 09, 2005 11:57 pm