my $parameter_value = "option2"; # Your default value from the DB my $parameter_select = qq( <select name="parameter"> <option value="option1">Option 1 <option value="option2">Option 2 </select> ); # your select statement string if ($parameter_value) { $parameter_select =~ s/value="$paremeter_value"/value="$paremeter_va +lue" selected/; }
In reply to Re: Dynamically marking a HTML select option as selected
by joealba
in thread Dynamically marking a HTML select option as selected
by ezekiel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |