I have 4 asp pages - 3 of which data is populated by the user. on the proceed of pages 1 - 3, the values are carried across as hidden values - so on the 4th page, called Submit.asp. the following is written.
I've added a link called, Print Form, which when clicked opens a pop-up window on top of submit.asp
I want this asp page to display all the populated fields in basic text, so it can be printed out (without headers/images etc)
Can I use request.form? I didn't think so as there are no form tags within submit.asp
How can I show the field values then?
any help much appreciated
Brian
<%
Dim myConn
Dim SQLString
Set myConn = Server.CreateObject("ADODB.Connection"
connStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("nameofdatabase"
myConn.Open connStr,"",""
SQLString = "INSERT INTO nameoftable ("
For each Field in Request.Form
SQLString = SQLString & Field & ", "
Next
SQLString = Left(SQLString, (Len(SQLString) -2))
SQLString = SQLString + " VALUES ("
For each Field in Request.Form
StrValue = Request.Form(Field)
SQLString = SQLString + "'" & Request(Field) & "', "
Next
SQLString = Left(SQLString, (Len(SQLString) -2))
SQLString = SQLString + ""
response.write SQLString
myConn.Execute(SQLString)
I've added a link called, Print Form, which when clicked opens a pop-up window on top of submit.asp
I want this asp page to display all the populated fields in basic text, so it can be printed out (without headers/images etc)
Can I use request.form? I didn't think so as there are no form tags within submit.asp
How can I show the field values then?
any help much appreciated
Brian
<%
Dim myConn
Dim SQLString
Set myConn = Server.CreateObject("ADODB.Connection"
connStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("nameofdatabase"
myConn.Open connStr,"",""
SQLString = "INSERT INTO nameoftable ("
For each Field in Request.Form
SQLString = SQLString & Field & ", "
Next
SQLString = Left(SQLString, (Len(SQLString) -2))
SQLString = SQLString + " VALUES ("
For each Field in Request.Form
StrValue = Request.Form(Field)
SQLString = SQLString + "'" & Request(Field) & "', "
Next
SQLString = Left(SQLString, (Len(SQLString) -2))
SQLString = SQLString + ""
response.write SQLString
myConn.Execute(SQLString)