Hi..I am just trying to save the data through Htmls form and after submitting the values the page1.htm on my browser just stuck and do nothing. I will really appreciate that you experts please look into my simple code and point out if I am doing something wrong
'Code for Page1.htm
<html>
<Body>
<form method="POST" action="save.asp" >
Input 1:<input type="text" name="Input1">
Input 2:<input type="text" name="Input2">
Input 3:<input type="text" name="Input3"><br>
<input type="submit" value="Submit">
</form>
</Body>
</Html>
'Code for save.asp
<%
Option Explicit
Dim sql
Dim oRS
Dim oConn, sConnString
Set oConn = Server.CreateObject("ADODB.Connection"
sConnString = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("\myusername\db\db2.mdb"
& ";"
oConn.Open(sConnString)
sql = "INSERT INTO Table1 (id1, Name, Phone) VALUES ('"
& request.form("Input1"
& "', '" & request.form("Input2"
& "', '" &
request.form("Input3"
& "'"
Set oRS = oConn.Execute(sql)
oConn.Close
Set oRS = Nothing
Set oConn = Nothing
Response.Write("<font size=3 face=arial>"
Response.Write("<b>Values Saved</b><br><br>"
%>
I know that probably its not nice to ask you for such basic help but I am really desperate and just need a start.
Cheers!
Aqif
'Code for Page1.htm
<html>
<Body>
<form method="POST" action="save.asp" >
Input 1:<input type="text" name="Input1">
Input 2:<input type="text" name="Input2">
Input 3:<input type="text" name="Input3"><br>
<input type="submit" value="Submit">
</form>
</Body>
</Html>
'Code for save.asp
<%
Option Explicit
Dim sql
Dim oRS
Dim oConn, sConnString
Set oConn = Server.CreateObject("ADODB.Connection"
sConnString = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("\myusername\db\db2.mdb"
oConn.Open(sConnString)
sql = "INSERT INTO Table1 (id1, Name, Phone) VALUES ('"
& request.form("Input1"
request.form("Input3"
Set oRS = oConn.Execute(sql)
oConn.Close
Set oRS = Nothing
Set oConn = Nothing
Response.Write("<font size=3 face=arial>"
Response.Write("<b>Values Saved</b><br><br>"
%>
I know that probably its not nice to ask you for such basic help but I am really desperate and just need a start.
Cheers!
Aqif