If Name <> "" and Surname <>"" and Email <> "" and Tel <> "" and Username <> "" and Password <> "" and Address <> "" Then
Set conn = Server.CreateObject("ADODB.Connection")
Conn.Provider="MIcrosoft.Jet.OLEDB.4.0"
Conn.Open Server.MapPath("ecommerce.mdb")
Sql="Select* From member WHERE USERNAME ='"&Username&"' "
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open Sql, conn, 1, 3
If not rs.RecordCount =0 then
sql="select * from member ORDER BY ID DESC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 1, 3
If rs.RecordCount = 0 then
id=0
else
id=rs("ID")
end if
rs.AddNew
rs("ID")=id + 1
rs("NAME")=name
rs("SURNAME")=surname
rs("EMAIL")=email
rs("TEL")=tel
rs("ADDRESS")=address
rs("USERNAME")=username
rs("PASSWORD")=password
rs("NUM_SHOP")=0