Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The form is posted to the same page and i use the following code:<form action="test.cgi" method="post"> <fieldset> <p><b>User Name:</b> <input type="text" name="username" size="10" maxl +ength="20" value="test" /></p> <p><b>Password:</b> <input type="password" name="password" size="20" m +axlength="20" /></p> <div align="center"><input type="image" name="submit" value="Login" sr +c="blue_login.gif" border=0 /></div> </form>
Any suggestions would be great!if ($ENV{'REQUEST_METHOD'} eq "GET"){ $my_data = $ENV{'QUERY_STRING'}; } else { $data_length = $ENV{'CONTENT_LENGTH'}; $bytes_read = read(STDIN, $my_data, $data_length); } @name_value_array = split(/&/, $my_data); foreach $name_value_pair (@name_value_array) { ($name, $value) = split(/=/, $name_value_pair); # $name =~ tr/+/ /; $value =~ tr/+/ /; $name =~ s/%(..)/pack("C",hex($1))/eg; $value =~ s/%(..)/pack("C",hex($1))/eg; if($form_data{$name}) { $form_data{$name} .= "\t$value"; } else { $form_data{$name} = $value; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: submit button image
by davidrw (Prior) on Jan 16, 2006 at 16:37 UTC | |
|
Re: submit button image
by wfsp (Abbot) on Jan 16, 2006 at 17:03 UTC | |
by Anonymous Monk on Jan 16, 2006 at 17:14 UTC |