Hi All,
        I have attached sample code that illustrates the problem

        Load COMMON.pm on startup, put html and cgi in proper places,
        configure to run the cgi as an Apache::Registry script.

        In a browser, load index html, fill out the fields and submit.
        Your input will not be echoed back

        Stop apache, remove the BEGIN block from COMMON.pm, restart, test.

        Input is now echoed back.

HTH
Dave

#######################################
package COMMON;

require Exporter;

use strict;

use CGI qw/:standard/;

our (@ISA, @EXPORT);

our ($USERID, $PASSWORD, $select_list);

@ISA    = qw(Exporter);
@EXPORT = qw($USERID $PASSWORD $select_list);
          
BEGIN{
        $select_list = scrolling_list(-name=>'TEST',
                                -values=>[1,2,3,4],
                                -default=>'1',
                                -size=> 1);
}

1;
# END
############################################
#login.cgi
#!/opt/bin/perl -T

use strict;

use CGI qw/:standard :cgi-lib/;
use COMMON;

# Get Form Values
$USERID                 = param("USERID");
$PASSWORD               = param("PASSWORD"); 

print header;
print "$USERID, $PASSWORD";

#END
###############################################
#index.html
<html>
<BODY BGCOLOR="white">

<form action="/cgi-bin/login.cgi" method="POST">
<table BORDER="0" cellspacing="0" cellpadding="0" width="250">
<tr><td colspan="2" ><font size="2" FACE="helvetica,arial">
Login Name:
</td><td>
<input type="text" name="USERID" size="20" maxlength="20">
</td></tr>
<tr><td colspan="2" ><font size="2" FACE="helvetica,arial">
Password
</td><td>
<input type="password" name="PASSWORD" size="20" maxlength="20">
</td></tr>
<tr><td colspan="4" >
----------------------------------
</td></tr> 
<tr><td>
<input type="submit" value="Log in">
</td> <td colspan="2" ><font size="2" FACE="helvetica,arial">
Test
</td></tr></table>
</form>
</body>
</html>
#END


-- 
Dave Morgan
[EMAIL PROTECTED]
403 399 2442

Reply via email to