[ic] Processing Perl with mv_click

Greg Goble interchange-users@icdevgroup.org
Wed Mar 12 11:22:00 2003


Hi folks,

RH7.3
IC4.8.5

I'm trying to filter the singe quote ' and convert it into an acsent ´
though the comments box on my order form, so that the single quote in the
comments box of my sql doesn't interfere with some onmouseover="retun
overlib('[sql-param comments]')...that I'm using.

If you notice the single quote, if used in the comments field, will cause an
error, therefore, I wish to replace it on the submission. I was told that
perl would do the trick on an mv_click, so I gave it a go with perl and got
it to work.

My question is now: How do I get this into the mv_click on my
ord/checkout.html page???
(if there's an easier way, pls let me know.)


require "subparseform.lib";
&Parse_Form;

$comments = $formdata{'comments'};

if ($comments =~ /'/) {
$comments =~ s/'/’/g;
}

Thanks, Greg G.