Ask a Question related to Dreamweaver AppDev, Design and Development.
-
mbwete #1
Registration page into database
Hi all,
Im doing a registration page for site visitors but I cant connect the
registration page and the databse. I have a primary key in the registration
table which is an auto number. Could that be a problem? Attached is the code,
please help.
Thanks,
Grace
Attach Code
ASP connection code:
<% @LANGUAGE = VBScript%>
<HTML>
<HEAD>
<TITLE>Database Connection</TITLE>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"></HEAD>
<BODY>
<%
Dim objConn, strConn, regStatement
Set objConn= Server.CreateObject("ADODB.Connection")
strConn = "Provider = Microsoft.Jet.OLEDB.4.0; Data
Source=C:\web\pelahet.mdb;"
objConn.Open strConn
regStatement="INSERT INTO Customers ('" & Request("CompanyName") & "','" &
Request("Title") & "','" & Request("FirstName") & "','" & Request("LastName") &
"','" & Request("CustomerEmail") & "','" & Request("BillingAddress1") & "','" &
Request("BillingAddress2") & "','" & Request("BillingCity") & "','" &
Request("BillingCounty") & "','" & Request("BillingPostalCode") & "','" &
Request("BillingCountry") & "','" & Request("Phone") & "','" & Request("Fax") &
"','" & Request("SameDelivery") & "', '"& Request("DeliveryAddress1") & "', '"
& Request("DeliveryAddress2") & "', '"& Request("ShipCity") & "', '"&
Request("ShipCounty") & "', '"& Request("ShipPostalCode") & "', '"&
Request("ShipCountry") & "', '"& Request("Password") & "', '"&
Request("Confirm") & "')"
objConn.Execute regStatement
objConn.close
Set objRS = Nothing
Response.Redirect("/RegResult.asp")
%>
</BODY>
</HTML>
Registration file
mbwete Guest
-
Creating a Login / Registration Page
Can someone please direct me to an article, website or any other data which will help me with this topic: I have a family website and my wife... -
Unable to use DW database registration feature
:cool; I am working with the ColdFusion MX 7 Getting Started Experience Tutorial, and would like to execute the Database regsitration function,... -
PHP/MySQL Registration Page
I have created a registration page that checks for a unique username before submitting the users info. If a username is found an error it thrown,... -
Registration Page
Hi all, Im doing a registration page for site visitors but I cant connect the registration page and the databse. I have a primary key in the... -
Have website login form check a forum database to verify registration
I need help with having a Login Form on a website that goes to a member only section, to beable to check my forum database so that when people... -
Paul Whitham TMM #2
Re: Registration page into database
Grace
That code is missing a whole section which is probably why it won't work. An
insert is written like this
Insert into tablename (FieldNames) values (formfieldname)
You have designed the values but not the fieldnames. Also password seems to
have become a reserved word on IIS6
--
Regards
Paul Whitham
Macromedia Certified Professional for Dreamweaver MX2004
Valleybiz Internet Design
[url]www.valleybiz.net[/url]
Team Macromedia Volunteer for Ultradev/Dreamweaver MX
[url]www.macromedia.com/support/forums/team_macromedia[/url]
"mbwete" <webforumsuser@macromedia.com> wrote in message
news:d32sbm$5d0$1@forums.macromedia.com...registration> Hi all,
> Im doing a registration page for site visitors but I cant connect the
> registration page and the databse. I have a primary key in thecode,> table which is an auto number. Could that be a problem? Attached is the&> please help.
>
> Thanks,
> Grace
> Attach Code
>
> ASP connection code:
> <% @LANGUAGE = VBScript%>
> <HTML>
> <HEAD>
> <TITLE>Database Connection</TITLE>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1"></HEAD>
>
> <BODY>
> <%
> Dim objConn, strConn, regStatement
>
> Set objConn= Server.CreateObject("ADODB.Connection")
> strConn = "Provider = Microsoft.Jet.OLEDB.4.0; Data
> Source=C:\web\pelahet.mdb;"
>
>
> objConn.Open strConn
>
> regStatement="INSERT INTO Customers ('" & Request("CompanyName") & "','"Request("LastName") &> Request("Title") & "','" & Request("FirstName") & "','" &"','" &> "','" & Request("CustomerEmail") & "','" & Request("BillingAddress1") &Request("Fax") &> Request("BillingAddress2") & "','" & Request("BillingCity") & "','" &
> Request("BillingCounty") & "','" & Request("BillingPostalCode") & "','" &
> Request("BillingCountry") & "','" & Request("Phone") & "','" &"', '"> "','" & Request("SameDelivery") & "', '"& Request("DeliveryAddress1") &> & Request("DeliveryAddress2") & "', '"& Request("ShipCity") & "', '"&
> Request("ShipCounty") & "', '"& Request("ShipPostalCode") & "', '"&
> Request("ShipCountry") & "', '"& Request("Password") & "', '"&
> Request("Confirm") & "')"
>
> objConn.Execute regStatement
>
>
> objConn.close
>
>
> Set objRS = Nothing
>
> Response.Redirect("/RegResult.asp")
> %>
> </BODY>
>
> </HTML>
>
> Registration file
>
>
>
Paul Whitham TMM Guest
-
mbwete #3
Re: Registration page into database
Hi Paul,
Thanks for the advice. Yes, i haave renamed password field and added all other
field names as well in the insert statement. My code is working properly now.
Thanks again.
cheers,
Grace
mbwete Guest



Reply With Quote

