i've never used ASP before, but am proficient with html / css
all i want to do is add a feedback form to a site. i have the form all set up as follows:
[html]
<form method="post" action="confirm.asp">
<table class="register">
<tr>
<td class="label">Full Name:</td>
<td class="data"><input type="text" name="name" /></td>
</tr>
<tr>
<td class="label">E-mail address:</td>
<td><input type="text" name="email" /></td>
</tr>
<tr>
<td class="label">Contact Number:</td>
<td><input type="text" name="number" /></td>
</tr>
<tr>
<td class="label">Postcode</td>
<td><input type="text" name="postcode" /></td>
</tr>
</table>
<p>Further Information: </p>
<p><textarea name="comments" rows="5" cols="70">Please leave your comments here - we will respond as quickly as possible.</textarea></p>
<p> <input type="submit" name="submit" value="Submit Contact Form" />
</p>
</form>
[/html]
simple eh?
however, i can't for the life of me get this into the database using ASP!
at the start of all my ASP pages i have:
Expand|Select|Wrap|Line Numbers
- <%
- Set objConn = Server.CreateObject("ADODB.Connection")
- Set objRs = Server.CreateObject("ADODB.Recordset")
- objConn.Provider = "Microsoft.Jet.OLEDB.4.0"
- objConn.Open "\\localhost/isproject/group_03.mdb"
- %>
so far i have:
Expand|Select|Wrap|Line Numbers
- <%
- obj.RS Open "contact", obj.Conn %>
- <% objRS.AddNew
- objRS("name") = Request.Form("name")
- objRS("email") = Request.Form("email")
- objRS("number") = Request.Form("number")
- objRS("postcode") = Request.Form("postcode")
- objRS("comments") = Request.Form("comments")
- objRS("datecontacted") = Date()
- objRS.Update
- %>
all the things i've seen on the web talk about defining DSNs and connections and so forth... i don't want any of that, i just want to connect to the database and add some records!
i should add - i have the database table "contact" set up already with the fields.... i just can't seem to enter data into it
can anyone help ??
Cheers
McChristie