Howdy all,
Just playing with a bit of Perl from a php background. I like the way Perl kind of cocoons me with the CGI.pm and the auto tainted data and the like. But I am a little confused with something most likely very minor.
I have a form, and I want to return the users to the form if the type something that is not valid to that field. If it's not valid then the input does not get assigned to the var and the user is back at the form..
My Question is, when re-populating the form with the users post data, is there any reason why that will need to be untainted seeing as though I am simply re-printing it into the field...
I have a feeling it should be but not sure just how smart the CGI.pm is when it comes to taking apart the url encoded string.
Little sample data below.
PHP Code:
print "<p class='error'>$errors{'phone'}</p><br />\n" if ($errors{'phone'});
print "<label for='phone'>Telephone: </label>";
print "\t\t", $fd->textfield(-name=>'phone',
-id=>'phone',
-default=>$fd->param('phone'),
-override=>1), "<br />\n";
(above: I know it's not php code but I, myself like syntax coding

Just wondering what the best practice is, all help appreciated.