Forums
This topic is locked
Submitting Variables to Database
12 Dec 2002 15:19:16 A. B. posted:
I have a two-part problem that I hope someone can help me solve.Setup:
I have Page1.asp that contains a form with dynamic fields. When "submit" is pressed, the values are sent to Page2.asp for verification by the user. If the user needs to change any information, he will return to Page1.asp to make changes. If the user agrees with what is listed on Page2.asp, he can press "submit" and the data is sent to a SQL Server 7 database.
Problems:
1. On Page2.asp, I cannot insert the data to the db unless I have actual fields on the page. Isn't there a way to insert the data to the db using the requested form variables that are displayed on the page?
2. I also need to e-mail this verified data to the user. Is there a way I can perform two actions on a form when "submit" is pressed? For example, the insert record and send e-mail would be the two actions.
Thank you in advance for your help!
Andrea
Replies
Replied 12 Dec 2002 16:08:53
12 Dec 2002 16:08:53 Vince Baker replied:
How I think I would do this is:
Page 1 inserts the record with s status set to "In Creation"
Page 2 then filters the database for the latest created record and displays the details with an identical form.
Then, let the user edit any details and then click on Confirm (submit button). Have a hidden field for the status and this time change it to "Complete" (or something simular).
To email the details you can move to a 3rd page that again filters the database using the Record ID. Perform you email script here and then you are done.
Regards
Vince
Response.write("The best line of code you can ever use"
VBScript | ASP | HTML | SQL | Oracle | Hosting
Page 1 inserts the record with s status set to "In Creation"
Page 2 then filters the database for the latest created record and displays the details with an identical form.
Then, let the user edit any details and then click on Confirm (submit button). Have a hidden field for the status and this time change it to "Complete" (or something simular).
To email the details you can move to a 3rd page that again filters the database using the Record ID. Perform you email script here and then you are done.
Regards
Vince
Response.write("The best line of code you can ever use"

VBScript | ASP | HTML | SQL | Oracle | Hosting