Michael Peters wrote:
Robert Hicks wrote:
I have all my forms validating. Yay!
Congratulations.
The question I have is what happens after validation?
$self->redirect('index.cgi?rm=show_next_page');
Change that to
return $self->show_next_page();
If you do a full redirect then yes, your CGI parameters will be lost, since they
only exist for that request and a redirect performs a separate HTTP request.
This is not C::A specific, but relates to all web programming.
But, after validation, you shouldn't access those values through the CGI query
object. You should get them from the Data::FormValiator::Results object that
check_rm will create.
$self->check_rm(....);
my $results = $self->dfv_results;
my $user_name = $results->valid('user_name');
This is because your validation profile can have some side effects.
+ It could "untaint" your data to make it safe for use.
+ If you use filters, they can alter your data (like 'trim', etc)
HTH
That was a great explanation. Thank you very much!
Robert
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]