[ic] perl code in mv_check gets executed despite verification failure

Jonathan Clark interchange-users@icdevgroup.org
Wed Feb 19 08:45:06 2003


> Hi - I strongly suspect i'm missing the point of mv_check. If i am can
> someone tell me the *proper* way to do this? I'm attempting to perform a
> database operation with form data but i only want the operation to
> happen if the form passes the verification successfully.
>
> I have mv_order_profile set to myprofile in a hidden field in my form.
> In etc/profiles.order i have defined myprofile. I have mv_check set to
> performop in a hidden field in my form. Later on that page i have a
> [seti performop]...[/seti] section with the code i want to execute after
> verification.

You should be setting your routine using [set] not [seti] - you are
interpolating and running the code when the page is delivered at the moment.

Jonathan
www.webmaint.net


> The verification process works fine with the user being bounced back to
> the page if the fields were not filled out properly and the problems
> marked in red. Now i *thought* that mv_check wouldn't get executed
> unless the verification was successful, but apparently it's getting
> executed every time the form is submitted, regardless.
>
> Assuming i've misunderstood the point of mv_check, what is the *proper*
> way to do this?