CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
data from a txt in a select list ?...

 



Debutant
Deleted

Sep 6, 2000, 7:05 AM

Post #1 of 2 (293 views)
data from a txt in a select list ?... Can't Post

hello,
I have a few arguments like :
oranges 12$
peach 1$
....
and I would like to have this list in a text format.... now come the great part...
I would like to show on a html page a select menu, where i can select the fruit and save the value in another txt file....

how can i do that... I tried with a normal list... without successs... should I use %Data...
please help....
Thanks
pierre


------------------


fashimpaur
User / Moderator

Sep 6, 2000, 11:22 AM

Post #2 of 2 (293 views)
Re: data from a txt in a select list ?... [In reply to] Can't Post

Pierre,

Yes, that would make the most sense.

Here is my line of thinking, even though you
did not give much detail....

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>



my %Fruits = ( 'Peaches' => 12,
'Pears' => 1,
'Bananas' => 6,
'Oranges' => 8);

</pre><HR></BLOCKQUOTE>

Using that hash, you can dynamically set up a select list in output HTML to have a select
with the visible names == keys %Fruits
and with the values of the selected items ==
values %Fruits.

When you read the values passed in, write the values of each chosen item in the select
box to the file/variable of your choosing.

HTH,

Dennis



 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives