<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PlaceName"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PlaceType"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place" downloadurl="http://www.5iantlavalamp.com/"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:Arial;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>I am
working on a very simple &#8220;feedback&#8221; type form for my site.&nbsp; I
realize this can be achieved with the collector or other intermediately complex
means, but for this site I need something very light weight and simple.&nbsp;
All I need is a table of &#8220;Subject&#8221;,&#8221;Email address&#8221; to
be read from a file rather than hiding the values in the form.&nbsp; Basically
the method that renders the form reads the file and picks up the subjects to
make a drop down, then when submitted it matches the subject to the appropriate
email address.&nbsp; If it&#8217;s not a valid subject it drops the request,
and only sends email to the right person.&nbsp; If this were perl on a
traditional web server I would have done this in like 60 seconds.&nbsp; As it
is I can&#8217;t figure out how to read in the data from the text file so it
goes into an array properly.&nbsp; I was hoping it might be as simple as doing<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>file_name<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>subject1,email1@host.com<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>subject2,email2@host.com<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>subject3,email3@host2.com<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>method<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>&#8230;
Form header and fields<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>&lt;select&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>&lt;dtml-call
file_name&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>&lt;dtml-in
file_name&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>&nbsp;&nbsp;&nbsp;
&lt;dtml-let keytosplit=sequence-item<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
feedback_name=&quot;_.string.split(keytosplit, ',')[0]&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
email_address=&quot;_.string.split(keytosplit, ',')[1]&quot;&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;option value=&#8221;&lt;dtml-var feedback_name&gt;&#8221;&gt;&lt;dtml-var feedback_name&gt;&lt;/select&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>&nbsp;
&lt;/dtml-let&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>&lt;/dtml-in&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>However
it treats file_name as a string and won&#8217;t let me &lt;dtml-in&gt; over
that.&nbsp; Is there a way to easily convert the contents of the file to a line
by line input for a &lt;dtml-in &gt;statement, or some other quick and dirty
way to do this?&nbsp; I&#8217;ve come up with some more complex ways with adding
a header character to each line to split on, with some form of loop through it
all, but turning the other file into a set for &lt;dtml-let&gt; seems to be the
most straight forward way to do it.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'>I&#8217;ve
come up with half a dozen other ways to handle this that include MySQL, or
other products, but I really would like it to be as simple as possible with as
few external dependencies as possible.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt'>---</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt'>Allen
Brokken</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt'>IAT
Services - ISAM</span></font><o:p></o:p></p>

<p class=MsoNormal><st1:place w:st="on"><st1:PlaceType w:st="on"><font size=2
  face=Arial><span style='font-size:10.0pt'>University</span></font></st1:PlaceType><font
 size=2><span style='font-size:10.0pt'> of <st1:PlaceName w:st="on">Missouri</st1:PlaceName></span></font></st1:place><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt'><a
href="mailto:brokkena@missouri.edu">brokkena@missouri.edu</a></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>