The keys and values in params will vary (ie, cannot always assume that "id" will be the name -- looking for a routine that's generic here). I order to prevent SQL injection, I need to escape any values in the %params that contain characters like '. Is there a simple way to go through params, and change all of the values inside of params? Edit: I know this is not perfect and that I should be using parameters -- just looking for something until a more permanent soultion is in place.my $cgi = CGI->new(); my %params = $cgi->Vars(); #want to escape %params here my $escapedId = $params{id};
In reply to Escaping %params by DaisyLou
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |