if ($form->submitted eq "Save Preferences" && $form->validate) {
my $user_name=$form->field('name');
foreach my $field (qw(password)) {
if ($form->submitted eq "Save Preferences" && $form->validate) {
my $user_name=$form->field('name');
foreach my $field (qw(password)) {