# This code is provided "as is" with NO WARRANTY expressed or
# implied. You may use it freely at your own risk.
#!/usr/bin/perl
use CGI;
$query = new CGI;
print $query->header;
$docpath = '/home/httpd/html/';
$html_path = "$docpath/my_form.html";
$html_file = `cat $html_path`;
@texttypes = getTexts($html_file);
foreach (@texttypes) {
$val = $query->param($_);
$val =~ s/"/"/g;
$html_file =~ s/(]*)(name="?$_"?)([^>]*>)/$1 $2 value="$val" $3/is;
}
@selects = getSelects($html_file);
foreach (@selects) {
$name = selectName($_);
$new_select = $_;
$val = $query->param($name);
if (/value="$val"/i) {
$new_select =~ s/(