LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > CGI/Perl/Python > need help - arrays for multiple select lists in CGI/HTML

Reply
 
Thread Tools Display Modes
  #1  
Old 05-21-2010, 10:07 AM
logik25 logik25 is offline
New Member
 
Join Date: May 2010
Posts: 1
Default need help - arrays for multiple select lists in CGI/HTML

I have a big problem at the moment. I am designing a website that will connect to a database. This website will allow users to upload posts in regards to certain topics. Upon registration of this website, they are also going to be able to chose who they wish to be friends with, so they can easily access their friends posts and communicate with them.

So basically, the database will hold a list of users, this list will grow over time (however, I doubt it will grow that big). Currently, the best way of implementing this ability to select who you want to be friends with is this:

1. the registration part of site will load fields (using CGI/HTML scripts created from python) for entering user details.
2. Then there will be some sort of select table where all users in the database is displayed (so this list will never be one particular size as users grow over time).
3. This list will allow you to select multiple friends. You can select one, or more friends. You can even select NONE as an option if you don’t know anyone yet.
4. Once user submits form, the python script will find exactly who this user wants to be friends with and create right entries for that in the database.

The database access is all ok for me, what I don’t know how to do is have some cgi/html code that will load all the users into a table where u can select from. I was thinking of using this:

<select multiple="multiple" size="8">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
</select>

But then for the option value part I would need to use an array list of variables. Is it possible to get something like that? Or is there any other way of doing this?

Further, is this method of implementing this feature good or is there a better way?

I really appreciate any help you provide, thank you everyone.

Last edited by logik25; 05-21-2010 at 10:09 AM.. Reason: didnt paste code sample properly
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:58 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.