View Single Post
  #3 (permalink)  
Old July 13th, 2004, 04:14 AM
terry_s terry_s is offline
Authorized User
Points: 37, Level: 1
Points: 37, Level: 1 Points: 37, Level: 1 Points: 37, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: , , Ireland.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi stephan here is some code that i have been working on works fine for me.
hope it helps !javascript:insertsmilie(';)')
Wink ;)



<%@LANGUAGE="JAVASCRIPT"%>
<%
// getting values from previous form
var sn,fn,surn,a1,a2,a3,ext,mobile,email,dob;
sn = Request.Form("staffNumber");
fn = Request.Form("firstname");
surn = Request.Form("surname");
a1 = Request.Form("address1");
a2 = Request.Form("address2");
a3 = Request.Form("address3");
ext = Request.Form("extn");
mobile = Request.Form("mobile");
email = Request.Form("email");
dob = Request.Form("day1") +"/"+Request.Form("month1")+"/"+Request.Form("year1");

adoConnection = Server.CreateObject("ADODB.Connection");
adoConnection.Open("DSN=input");

var SQL = "INSERT INTO tblStaff (staffID,firstname,surname,DateOfBirth,address1,ad dress2,address3,extn,mobile,email)";
SQL = SQL + "VALUES("+sn+",'"+fn+"','"+surn+"','"+dob+"','"+a1 +"','"+a2+"','"+a3+"',"+ext+","+mobile+",'"+email+ "')";

adoConnection.Execute(SQL);
adoConnection.Close();
adoConnection = null;
Response.Redirect("part1done.asp");

%>;););)

Reply With Quote