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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit THEN print

Status
Not open for further replies.

GaryCam

Programmer
Dec 16, 2003
69
US
I'm trying to make changes to an ecommerce site written by someone else. Obviously there is an order form which the visitor fills out. When he's finished, a confirmation form summarizing the entries appears and asks him to verify all the information. If it's OK, he clicks a submit button and the data is sent to the database. After submission, a page opens which asks if he'd like to print a receipt.

My question is this: is there a way to "regenerate" the confirmation form after it's been submitted without pulling all the data out of the database? The summary form is comprised of vbscript as in:

<% Response.Write Request.Form(&quot;shipAdd&quot;) %>

If you're wondering why I don't want to get the data from the database, it's because I know even less about databases than js!! (hard to believe but true).

Thanks,
Gary



 
Why can't you do the confirmation form using same kind of code you posted form the summary form?

Adam
while(ignorance==true){perpetuate(violence,fear,hatred);life=life-1};
 
I tried that but all the data is gone once it's been submitted.
~ Gary
 
you should be able to generate the data directly after submitting to the database...all on the same page:

=> User submits confirmation

--next page

=> Gather data and submit to database, then use the same variables--that you just used to submit to the database--to create your confirmation page.

This should be possible, but I haven't seen the code, so I don't know how the information is being passed from page to page...

...However, this is a problem if you need to get a special ID number from the database as the &quot;confirmation,&quot; in which case you HAVE to query the database whether you want to or not...this is likely why it was done the way it's currently done. You can typically query the database (MySQL, etc.) for the last inserted row using the query &quot;SELECT @@IDENTITY FROM tableName&quot; then the 0 value of your recordset variable: rSet(0) (varying syntax with VBScript) will be your row ID in the database (hope that's not confusing)...if you don't need any id value, then don't bother with this paragraph :)

anyway, don't know whether this is helpful or not...but thought I'd give my shot.

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top