Registration page into database

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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,...
    3. 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,...
    4. 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...
    5. 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...
  3. #2

    Default 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...
    > 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
    >
    >
    >

    Paul Whitham TMM Guest

  4. #3

    Default 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

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139