I am using a form on my website to submit a few details on another web site using a similar form.
My details are checked by their cgi and they normally return a success page or a failure page.

Is it possible to check for the output of the cgi and depending on what is the result to show my success or failure page?

I hope you understood what I mean.