I have 2 tables:
tblUsers
ID
email
.
tblUsersSecurity
ID
Username
Password
.
I have a basic form that displays every field of tblUsers. I'd like to add a command button that:
1) encrypts tblUsers.ID (I have a component for that)
2) updates tblUserSecurity setting Username=tblUsers.Email, and password=encrypted tblUsers.ID
Here's how I have done it in vbscript(ASP):
Set cryObject = server.createobject("mycrypto.crypto"
set conn=server.createobject("adodb.connection"
conn.Open strConn
strsql="update tblUserSecurity set PASSWORD = '" & cryObject.OmnisHash(ID) & "',username= '" & email & "' where ID='" & cid & "'"
conn.execute(strsql)
conn.close
set conn=nothing
set cryObject=Nothing
What I don't know how to do is get the values from the form and how to put the right values in tblUserSecurity. I assume I would use a Module of some sort.
Any help would be GREATLY appreciated.
Thanks in advance.
tblUsers
ID
.
tblUsersSecurity
ID
Username
Password
.
I have a basic form that displays every field of tblUsers. I'd like to add a command button that:
1) encrypts tblUsers.ID (I have a component for that)
2) updates tblUserSecurity setting Username=tblUsers.Email, and password=encrypted tblUsers.ID
Here's how I have done it in vbscript(ASP):
Set cryObject = server.createobject("mycrypto.crypto"
set conn=server.createobject("adodb.connection"
conn.Open strConn
strsql="update tblUserSecurity set PASSWORD = '" & cryObject.OmnisHash(ID) & "',username= '" & email & "' where ID='" & cid & "'"
conn.execute(strsql)
conn.close
set conn=nothing
set cryObject=Nothing
What I don't know how to do is get the values from the form and how to put the right values in tblUserSecurity. I assume I would use a Module of some sort.
Any help would be GREATLY appreciated.
Thanks in advance.