summaryrefslogtreecommitdiff
path: root/httemplate/search/cust_main-otaker.cgi
blob: b7173c49c77f8ffa409306e4f6c64902c60e07f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<HTML>
  <HEAD>
    <TITLE>Customer Search</TITLE>
  </HEAD>
  <BODY BGCOLOR="#e8e8e8">
    <FONT SIZE=7>
      Customer Search
    </FONT>
    <BR>
    <FORM ACTION="cust_main.cgi" METHOD="post">
      Search for <B>Order taker</B>: 
      <INPUT TYPE="hidden" NAME="otaker_on" VALUE="TRUE">
      <% my $dbh = dbh;
         my $sth = dbh->prepare("SELECT DISTINCT otaker FROM cust_main")
           or eidiot $dbh->errstr;
         $sth->execute() or eidiot $sth->errstr;
#         my @otakers = map { $_->[0] } @{$sth->selectall_arrayref};
      %>
      <SELECT NAME="otaker">
      <% my $otaker; while ( $otaker = $sth->fetchrow_arrayref ) { %>
        <OPTION><%= $otaker->[0] %></OTAKER>
      <% } %>
      </SELECT>
      <P><INPUT TYPE="submit" VALUE="Search">

    </FORM>
  </BODY>
</HTML>