<% set c=server.createobject("adodb.connection") dsn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.mappath("pdb.mdb") & ";" c.open dsn
set R = server.createobject("adodb.recordset") R.activeconnection=c
c_name=request.form("c_name") c_id=request.form("c_id") c_mail=request.form("c_mail") c_class=request.form("c_class") c_gender=request.form("c_gender") c_txt=request.form("c_txt") bcolor=request.form("bcolor") tcolor=request.form("tcolor") c_pic=request.form("c_pic")
sql1= "select * FROM personaldata WHERE (c_name ='"&c_name&"' )" R.open sql1 if R.eof then sqlstring = "insert into personaldata values ('"&_ c_name&"','"&c_id&"','"&c_mail&"','"& ;c_class&"','"&c_gender&"','"&c_txt&"',' "&bcolor&"','"&tcolor&"','"&c_pic&"' )" 'response.write sqlstring
c.execute sqlstring response.write "<center>" response.write "<br>המידע נשלח בהצלחה <br><a href=search.html>חזרה לחיפוש</a>" response.write "</center>" else response.write "<center>השם תפוס<br><a href=registerform.html>חזור לטופס</a></center>" end if
c.close set c = Nothing %>
|