<%
eMail = Request.Form("eMail")
Connection
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=" & Server.MapPath("omridb.mdb") & ";" &_
"Uid=admin;" &_
"Pwd=;"
Set oRS = Server.CreateObject("ADODB.Recordset")
mySQL = "SELECT * FROM friends WHERE eMail=" & "'" & eMail & "'"
oRS.Open mySQL, Conn, 3, 3
If (oRS.RecordCount=0) Then
oRS.addNew
oRS.Fields("firstName").value = firstname
oRS.Fields("lastName").value = lastname
oRS.Fields("gender").value = Gender
oRS.Fields("eMail").value = eMail
oRS.Fields("area").value = area
oRS.close
set oRS = nothing
Conn.Close
set Conn = Nothing
%>
<html dir=rtl>
<body background=reka2.jpg>
<h2><font color="'white">
עדכון פרטים
</font></h2>
<form name=forminfected method="post" action="http://localhost/omri/updatedb.asp" >
<select name="area">
<%
if area= "צפון" then
Response.write ("<option Value= 'צפון' selected='selected'>צפון
</option>")
Else
Response.write("<option Value= צפון'< צפון' </option>")
if area= "מרכז" then
Response.write ("<option Value= 'מרכז'
selected='selected'>מרכז</option>")
Else
Response.write("<option Value= מרכז'< מרכז' </option>")
if area= "מרכז" then
Response.write ("<option Value= 'דרום'
selected='selected'>דרום</option>")
Else
Response.write("<option Value= מרכז'< דרום' </option>")
End if
%>
</select>
שם פרטי:
<input type="text" name="firstname"
value="<% =firstname %>" /> <br/>
שם משפחה
<input type="text" name="lastname"
value="<% =lastname %>" /> <br/>
מין:
<%
If Gender="זכר" Then
Response.write ("זכר<input type=radio name=gen value=זכר
checked='checked'/>")
Response.write
(" ")
Response.write ("נקבה<input type=radio name=gen value=נקבה />")
Else
Response.write ("זכר<input type=radio name=gen value=זכר />")
Response.write
(" ")
Response.write ("נקבה<input type=radio name=gen value=נקבה
checked='checked'/>")
End If
%>
</br>
<input type=submit value="שלח"/>
<a hreff='http://localhost/omri/updatedb.asp'</a>
</form>
</html>
|