Forms, sessions and $HTTP_SESSION_VARS

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Rincewind
Forum Commoner
Posts: 27
Joined: Thu Nov 21, 2002 11:15 am
Location: Norway

Forms, sessions and $HTTP_SESSION_VARS

Post by Rincewind »

Can anyone tell me how I pass form-content via $HTTP_SESSION_VARS or some other way of doing this when the form generates an array and I don't have register_globals turned on?
There's no problem doing this with register_globals turned on and I guess I could use $_POST but that would mean that I'd have to send the user to another page won't it?
Basically what I want is to be able to register an array on one page with a form resulting in the same page (iow you're still on the same page but the array is stored) and then accessing that array on another page.
Any ideas would be much appreciated.

Thanx

Rincewind_the_Wizzard

"Luck is my middle name" mumbled Rincewind, "mind you, my first name is Bad...."
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

I think i know what your asking but if you could clarify and maybe put some full stops in that would be great. Gramma is so important when asking questions about PHP and code. hahaha

If i'm right though, and you talking about something like i've done on my site, using 1 page to do multiple things and display as separate pages?

http://www.clandazed.com/?com=register

??
Rincewind
Forum Commoner
Posts: 27
Joined: Thu Nov 21, 2002 11:15 am
Location: Norway

Post by Rincewind »

Hmm, let's see.
I have several similar to this: (example)

Code: Select all

<form method="POST">
<select name="form_products&#1111;]" multiple size=3>
<option> Item 1
<option> Item 2
<option> Item 3
<option> Item 4
<option> Item 5
</select>
In one page.
What I want is to be able to mark a couple of items in the list, hit the submit-button and store the array and still be on the same page so I can select from other lists and add to the array and have that array stored as a session-variable...
Did that make any sense?

Rincewind
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

I'm at work at the moment, when i get home i'll work on something for ya and post it. I'm finished in about an hour.

Sorry cant do much at the moment because its getting busy.
Post Reply