From the description of your problem, I gather you are using one of those dynamic form modules?
Since you are using code you can't modify yourself (an assumption, of course), you'll need to set up a page that has nothing but the following in it (you can even just create an HTML page, instead of using DNN page, and upload it to your site):
and have your module save to DB and redirect to that page.
If you prefer to use a DNN page for that redirection, then just copy the whole code from <script... to .../script> into Page Header Tags settings of that page. BEWARE: you will not be able to navigate to that page - it'll immediately redirect you. So, if you ever need to make changes to it in the future, you can access the page settings via Admin > Pages screen.