Hey all, I think I may have some kind of caching problem. When I submit my form and fill out all details except one field (first name) the form should be returned with the value I set in the function below. Anyone have any idea why the form is returning the value that was entered on the form instead of the value that has been set in the function?

Cheers for any tips/advice/help etc

Graeme :)


Here's the script:

http://captainchainsaw.homelinux.com/cgi-bin/main.pl



########################### code ##########################
sub get_form_values{
   my $self=shift;
   my $q = shift;
   my $first_name=shift;
   my $last_name=shift;
   my $email=shift;



$first_name = $q->textfield(-name=>'first_name',
                              -value=>"$first_name",
                              -size=>30,
                              -maxlength=>40);

$last_name  = $q->textfield(-name=>'last_name',
                              -value=>"$last_name",
                              -size=>30,
                              -maxlength=>40);

$email      = $q->textfield(-name=>'email',
                              -value=>"$email",
                              -size=>30,
                              -maxlength=>75);


my $password = $q->textfield(-name=>'password', -value=>"password", -size=>30, -maxlength=>50);

my $confirm_password = $q->password_field(-name=>'confirm_password',
                                    -value=>"confirm_password",
                                    -size=>30,
                                    -maxlength=>50);

my $submit = $q->submit(-name=>'button_name',
                       -value=>'Submit');



return ($first_name, $last_name, $email, $password, $confirm_password, $submit);
}
###########################################################




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to