list box hell [SOLVED]

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
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

list box hell [SOLVED]

Post by C_Calav »

hi guys,

from one page i post to the next page.

on that page i have a select box - the user selects a option and clicks a "show" button - (page refreshes) - the users for that branch are now displayed in a list box.

from the list box the user can select a person and click "add" (page refreshes) - now they are displayed in another list box underneath.

now eveytime the page refreshes the second list box is blank because it has no ID passed to it from the select box.

is there a way i can keep the option that was last in there in the first amd second select box?

also, is there a way to display all users in the first list box when the user firsts goes to the page? as in a option is not selected in the select box?


does this make sense tell me and ill try to explain.

bascially im geting it working this way first then i will add javascript later to update the pages as the user selects options.

i dont think im ready for the javascript bit yet of dynamicly updateing the
list boxes!

thanx guys
Last edited by C_Calav on Tue Feb 01, 2005 6:22 pm, edited 1 time in total.
User avatar
C_Calav
Forum Contributor
Posts: 395
Joined: Wed Jun 02, 2004 10:55 pm
Location: New Zealand

Post by C_Calav »

i think i have got what i wanted now..

just used a whole bunch of

if ($_SERVER['REQUEST_METHOD'] == "POST")
&
if ($_SERVER['REQUEST_METHOD'] == "GET")

and passed the ID's round

if anyone knows any better way of keeping what was lat selected in a select and list box's please post.

cheers
Post Reply