# CGI question

**URL:** <https://www.ruby-forum.com/t/cgi-question/90978>\
**Category:** Ruby\
**Created:** [April 3, 2007, 2:56pm UTC](https://www.ruby-forum.com/t/cgi-question/90978 "2007-04-03T14:56:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoeyP](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@JoeyP](https://www.ruby-forum.com/u/JoeyP)\
**Post date:** [April 3, 2007, 2:56pm UTC](https://www.ruby-forum.com/t/cgi-question/90978/1 "2007-04-03T14:56:27Z")

</div>

Hello,  
I am using the CGI class to create a web page.  
I need a drop down list. I have a formatted string in a DB table for  
the values.  
How can I access the variable?

```
       cgi.option('value'=>'pathway') { "KEGG/PATHWAY" } +
        cgi.option('value'=>'brite') { "KEGG/BRITE" } +
        cgi.option('value'=>'genes') { "KEGG/GENES" } +

```

I’m trying this:

cgi.option( myformattedstring) { " some text"}+

The problem is that I cannot use ‘myformattedstring’ variable.

I declare it like this:  
myformattedstring \<\< " ‘value’=\>‘red’ "

Any thoughts on how I can get this working?

Thanks in advance
