Print Page | Close Window

help with INSERT FORM DATA TO DATABASE

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=2590
Printed Date: 31 March 2026 at 9:33pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: help with INSERT FORM DATA TO DATABASE
Posted By: zadax
Subject: help with INSERT FORM DATA TO DATABASE
Date Posted: 10 May 2003 at 2:28pm

ok look on this :

The first thing you need to do is create a formpage.asp page with the code below:

<form name="YourFormName" method="Post" action="resultspage.asp">
<table>
<tr><td>Email: </td>
<td><input type="text" name="Email" size="50"></td></tr>
<tr><td>Name: </td>
<td><input type="text" name="Name" size="50"></td></tr>
<tr><td>Comments: </td>
<td><textarea name="Comments"></textarea></td>
</table>

<input type="submit" name="Submit" value="Submit Form">
</FORM>

Next, we create a resultspage.asp page and enter the code as seen below:

<!--#INCLUDE VIRTUAL="/includes/connection.asp" -->

<%
DIM objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "YOUR table name HERE", objConn, , adLockOptimistic, adCmdTable

objRS.AddNew
objRS("Email") = Request.Form("Email")
objRS("Name") = Request.Form("Name")
objRS("Comments") = Request.Form("Comments")
objRS.Update

objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>

<p>
<%
DIM strName
strName = Request.Form("Name")
Response.Write strName
%>,</p>

<p>Thank you for emailing me.</>

 

its From aspwebpro .

i m Stuck here : <!--#INCLUDE VIRTUAL="/includes/connection.asp" -->

what the hell he want from me ?  Where is that page ? its not Exsist .

i need to Make it right ?  if so how ?  

oh and i need to make Db or somthing ?

can somone help me

Edit :

ok i understand i need to open Conection to the Db ... How to do it ?

and How i make the Db ? (i have Access)




Replies:
Posted By: zadax
Date Posted: 10 May 2003 at 2:32pm

ok i think i found the Answer for the Conection thing it shuld be :

<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=myCONNECTION.dsn"
objConn.Open
%>

This example uses a DSN-less connection:

<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath ("/mydatabase.mdb") & ";"
objConn.Open
%>

 

i need to Write this in Page called CONNECTION.asp right ?

ok now ..... How i make The Db ?



Posted By: zadax
Date Posted: 11 May 2003 at 6:47am
no one gonna help me


Posted By: michael
Date Posted: 11 May 2003 at 8:26am

You need to make the db in access.



-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net