Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hello I have a form which, when

Status
Not open for further replies.

madHatter1

Technical User
Feb 27, 2003
54
0
0
GB
Hello

I have a form which, when completed, shows a Thank You personalised page.

The script which helps to do that is:

<form name=&quot;thanks&quot; method=&quot;POST&quot; action=&quot;thanks.asp&quot; etc

I now wish to store the contents of the form into a database, and I need to use:

<form action=&quot;form_ac.asp&quot; method=&quot;post&quot;>

form_ac.asp contains the script which inserts the data into the database. The code works by itself.

But when I place:

<form name=&quot;thanks&quot; method=&quot;POST&quot; action=&quot;thanks.asp&quot; etc
<form action=&quot;form_ac.asp&quot; method=&quot;post&quot;>

together on the form page, the database function does not work.

Is there a way to solve this, please?

Thank you.

Hatter
 
why would you put two forms tags together like that? Why not action the database script and redirect it to the thank you page grant it there were now errors?
 
Hello

Thank you for your replies.

I have removed:

<form action=&quot;thanks&quot; method=&quot;POST&quot; action=&quot;thanks.asp&quot; onSubmit=&quot;return ValidateEmail(document.thanks.email.value);window.close()&quot;

which is what I had behind my form, and instead have placed:

<form action=&quot;form_ac.asp&quot; method=&quot;post&quot;>

does insert the data, input by the visitor via the form, into the database! Many thanks!

I have also placed:

Call Response.Redirect(&quot;thanks.asp&quot;)

in the form_ac.asp file. This does redirect the user to the &quot;Thanks&quot; page, but this time it is not personalised. It is almost as if I can only have one or ther other which, I hope, is not the case.

Any further advice (but thanks again, for the database help - great).

Hatter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top