D
Dev Web
I've been working on this all day, and I still can't get it.
Need some help. Is there anyone out there who would write a new code
page for me - the correct way?
I seem to fix one thing and get another error - and I just don't know
what I am doing incorrectly. HELP!!
The ideal situation is this: I have a orders.html form that when the
user pushes submit to order products, another screen comes up with a
message but all information from the form is then submitted back to a
Access database.
Code below for NanoGroup.asp Page:
<% @Language="VBScript"%>
<% Response.Buffer=true %>
<HTML>
<!-- #INCLUDE FILE="ADOVBS.inc" -->
<!-- #INCLUDE FILE="order.inc" -->
<HEAD>
<TITLE>NanoGroup.asp - From ORDER FORM Order.html- Nano Group Computer
Sales & Support. Using ASP page - Adding a new record to Access
database</TITLE>
<LINK REL=STYLESHEET TYPE="text/css" HREF="main.css">
</HEAD>
<BODY>
<H1> Nano Group Computer Sales & Support</H1>
<H3> Thank you for purchasing our Products, you will receive your
shipment within 2-4 business days! </H3>
<%
Dim strCategory, strProduct, strFirst, strLast, strAddress,
strProvince, strPostalCode, strTelephone, strEmail
strCategory = Request.Form("optCategory")
strProduct = Request.Form("optProduct")
strFirstname = Request.Form("txtFirst")
strLastname = Request.Form("txtLast")
strAddress = Request.Form("txtAddress")
strCity = Request.Form("txtCity")
strProvince = Request.Form("txtProvince")
strPostalCode = Request.Form("txtPostalCode")
strTelephone = Request.Form("txtPhone")
strEmail = Request.Form("txtEmail")
%>
<%
Set objrsUser = Server.CreateObject("ADODB.Connection")
strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.Mappath("/admin/Nano.mdb")
objrsUser.Open strConnectionString=
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.Mappath("/admin/Nano.mdb")
objrsUsers.Filter = "Email= '" & Request.Form("txtEmail") & "'"
if objrsUsers.EOF then
objrsUsers.AddNew
end if
objrsUsers("Category") = strCategory 'populate a new record or modify
current one
objrsUsers("Product") = strProduct
objrsUsers("LastName") = strLast
objrsUsers("FirstName") = strFirst
objrsUsers("Address") = strAddress
objrsUsers("City") = strCity
objrsUsers("Province") = strProvince
objrsUsers("PostalCode") = strPostalCode
objrsUsers("Telephone") = strTelephone
objrsUsers("Email") = strEmail
strobjrsUser.Close
Set objrsUser = Nothing
%>
<HR>
Welcome <% Response.Write strFirst %> <% Response.Write strLast%>
and thank you for ordering
your products from Nano Group Computer Sales & Support.
<BR>
You product(s) have been ordered, and your information has been updated
in our database.
<BR>
</BODY>
</HTML>
Thank you so much. I do need this working a s a p.
If you need any other files attached just let me know. Also you can
email me directly too.
Many thanks
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Need some help. Is there anyone out there who would write a new code
page for me - the correct way?
I seem to fix one thing and get another error - and I just don't know
what I am doing incorrectly. HELP!!
The ideal situation is this: I have a orders.html form that when the
user pushes submit to order products, another screen comes up with a
message but all information from the form is then submitted back to a
Access database.
Code below for NanoGroup.asp Page:
<% @Language="VBScript"%>
<% Response.Buffer=true %>
<HTML>
<!-- #INCLUDE FILE="ADOVBS.inc" -->
<!-- #INCLUDE FILE="order.inc" -->
<HEAD>
<TITLE>NanoGroup.asp - From ORDER FORM Order.html- Nano Group Computer
Sales & Support. Using ASP page - Adding a new record to Access
database</TITLE>
<LINK REL=STYLESHEET TYPE="text/css" HREF="main.css">
</HEAD>
<BODY>
<H1> Nano Group Computer Sales & Support</H1>
<H3> Thank you for purchasing our Products, you will receive your
shipment within 2-4 business days! </H3>
<%
Dim strCategory, strProduct, strFirst, strLast, strAddress,
strProvince, strPostalCode, strTelephone, strEmail
strCategory = Request.Form("optCategory")
strProduct = Request.Form("optProduct")
strFirstname = Request.Form("txtFirst")
strLastname = Request.Form("txtLast")
strAddress = Request.Form("txtAddress")
strCity = Request.Form("txtCity")
strProvince = Request.Form("txtProvince")
strPostalCode = Request.Form("txtPostalCode")
strTelephone = Request.Form("txtPhone")
strEmail = Request.Form("txtEmail")
%>
<%
Set objrsUser = Server.CreateObject("ADODB.Connection")
strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.Mappath("/admin/Nano.mdb")
objrsUser.Open strConnectionString=
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.Mappath("/admin/Nano.mdb")
objrsUsers.Filter = "Email= '" & Request.Form("txtEmail") & "'"
if objrsUsers.EOF then
objrsUsers.AddNew
end if
objrsUsers("Category") = strCategory 'populate a new record or modify
current one
objrsUsers("Product") = strProduct
objrsUsers("LastName") = strLast
objrsUsers("FirstName") = strFirst
objrsUsers("Address") = strAddress
objrsUsers("City") = strCity
objrsUsers("Province") = strProvince
objrsUsers("PostalCode") = strPostalCode
objrsUsers("Telephone") = strTelephone
objrsUsers("Email") = strEmail
strobjrsUser.Close
Set objrsUser = Nothing
%>
<HR>
Welcome <% Response.Write strFirst %> <% Response.Write strLast%>
and thank you for ordering
your products from Nano Group Computer Sales & Support.
<BR>
You product(s) have been ordered, and your information has been updated
in our database.
<BR>
</BODY>
</HTML>
Thank you so much. I do need this working a s a p.
If you need any other files attached just let me know. Also you can
email me directly too.
Many thanks
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!