I have a form that submits to an ASP page (ProcessForm.asp) to update the
database. However, the ASP page does a check on one of the fields in the
form lets say FirstName to see if ther is already a FirstName in the
database that matches the one the user submitted. The ProcessForm page
writes some javascript onto the page to alert the user and give them the
option to go back or continue with the update. At the moment, I use a hidden
form in the process page, and populate a variable strSQL which contains the
sql update string. If the user clicks OK, this is submitted to a
ProcessSQL.asp page.

This is a pretty unsecure way of doing things as ProcessSQL could receive
any form value and run the sql string that was passed. Ideally, I would want
the ProcessForm page to resend the Request.Form() collection back to itself,
with a variable in the querystring to let it know not to do the dupicates
check.

Is there a way of doing a Response.Redirect (processForm.asp) and mimicking
the first form subission so it beahaves like it has just received the POST
from the form???

Thnx in advance

Paul

Mimic the form POST by Cliff

Cliff
Fri Aug 22 12:44:01 CDT 2003

Hi Paul,

Yes there is a way.
Have the Form post to itself by
<form action="Request.ServerVariables("URL") method="POST">
Then run some validation checks on the data and then
redirect to your processSQL.asp

That should do it
Cliff
:)


>-----Original Message-----
>I have a form that submits to an ASP page
(ProcessForm.asp) to update the
>database. However, the ASP page does a check on one of
the fields in the
>form lets say FirstName to see if ther is already a
FirstName in the
>database that matches the one the user submitted. The
ProcessForm page
>writes some javascript onto the page to alert the user
and give them the
>option to go back or continue with the update. At the
moment, I use a hidden
>form in the process page, and populate a variable strSQL
which contains the
>sql update string. If the user clicks OK, this is
submitted to a
>ProcessSQL.asp page.
>
>This is a pretty unsecure way of doing things as
ProcessSQL could receive
>any form value and run the sql string that was passed.
Ideally, I would want
>the ProcessForm page to resend the Request.Form()
collection back to itself,
>with a variable in the querystring to let it know not to
do the dupicates
>check.
>
>Is there a way of doing a Response.Redirect
(processForm.asp) and mimicking
>the first form subission so it beahaves like it has just
received the POST
>from the form???
>
>Thnx in advance
>
>Paul
>
>
>.
>