<% Ptype = request.form("TXTtype") Pname = request.form("TXTname") Ptitle = request.form("TXTtitle") Pheading = request.form("TXTheading") Ploc = request.form("TXTlocation") Parea = request.form("TXTplotarea") PBUA = request.form("TXTbua") Pfloors = request.form("TXTfloors") Pprice = request.form("TXTprice") Ppark = request.form("TXtparkings") Pdesc = request.form("TXTdesc") Pimage = request.form("T1") Pflag = request.form("TXTflag") Dim AdoCon Dim RsEnq Dim SQLEN set AdoCon = server.createobject("ADODB.CONNECTION") set RsEnq = server.createobject("ADODB.RECORDSET") AdoCon.Open "Driver={MICROSOFT ACCESS DRIVER (*.mdb)};DBQ=" & server.mappath("/DB/fh.mdb") set RsID = server.createobject("ADODB.RECORDSET") SQLID = "select MAX(ID) from invest" RsID.Open SQLID, AdoCon Dim IDD IDD= RsID(0) IDD = IDD + 1 response.write IDD 'response.end SQLEN ="INSERT INTO invest(ID,Type,Name,Title,PHeading,Location,PlotArea,Built,floors,price,parkings,Description,Image,flag)VALUES('" & IDD &_ "','"& Ptype &_ "','" & Pname &_ "','" & Ptitle &_ "','" & Pheading &_ "','" & Ploc &_ "','" & Parea &_ "','" & PBUA &_ "','" & Pfloors &_ "','" & Pprice &_ "','" & Ppark &_ "','" & Pdesc &_ "','" & Pimage &_ "','" & Pflag & "')" 'response.write SQLEN RsEnq.Open SQLEN, AdoCon %> Enquiry Sent
Done.
<% AdoCon.Close %>