Sending Data to Next Page

Results 1 to 2 of 2

Thread: Sending Data to Next Page

  1. #1
    Join Date
    Dec 1969

    Default Sending Data to Next Page

    I&#039;m doing this project for a teacher at a school. She&#039;s in charge of a child development program called 504. Usually, she has to fill out several forms for each child in the program. I created web-based forms for her to type in and when she clicks submit, she can print out somewhat of a print preview with the form with the information she typed in. Basically, it&#039;s just a HTML form posting to an ASP page with Request.Forms all over. Now, she wants to be able to save the data in a database. Currently, I have the HTML form posting to a AddToDatabase ASP page, inserting the data she typed into a database. But she still needs the "printable" page. How can I have the printable page , come after the data is inserted into the DB? I used to know how to do this, but it&#039;s been about a year since I last did ASP. Here&#039;s the code:<BR><BR>This is the Add to Database ASP:<BR><BR>&#060;%@ Language=VBSCRIPT %&#062;<BR>&#060;html&#062;<BR>&#060;body&#062;<BR >&#060;%<BR><BR>stud_name = Request.Form("stud_name")<BR>evaluation = Request.Form("eval")<BR>reason = Replace(Request.form("reason"), "&#039;", "&#039;&#039;") <BR><BR><BR>Dim strSQL<BR>strSQL = "INSERT INTO requestconsent (stud_name, eval, reason) VALUES (&#039;" & stud_name & "&#039;, &#039;" & evaluation & "&#039;, &#039;" & reason & "&#039;)"<BR><BR>Dim objCmd<BR>Set objCmd = Server.CreateObject("ADODB.Command")<BR>objCmd.Act iveConnection = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("504.mdb")<BR>objCmd.CommandText = strSQL<BR>objCmd.Execute<BR>Set objCmd = Nothing<BR>%&#062;<BR><BR>The entry was added. Click &#060;a href="index.htm"&#062;here&#060;/a&#062; to return to the main screen.<BR>&#060;/body&#062;<BR>&#060;/html&#062;<BR><BR>*************<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Sending Data to Next Page

    I would take the code from the body of your printable page and throw it into the body of the AddToDatabase page. OR you could response.Redirect"url"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts