Q
|
qqqqq author 4/25/2007 |
I guess I should add this info, the table has an autonumber as its primary key. The edit page uses this field and the user name as parameters. I can get the username into a link but can't see how to get the other field. |
J
|
Jane 4/26/2007 |
Hi, Sub AfterSuccessfulLogin() str = "select FieldID from TableName where UserName='" & Session("UserID") & "'" Set rsTemp = server.CreateObject("ADODB.Recordset") rsTemp.open str, dbConnection if not rsTemp.eof then Response.Redirect "users_edit.asp?editid1=" & rsTemp("FieldID") & "&editid2=" & Session("UserID") else Response.Redirect "menu.asp" end if End Sub
|
Q
|
qqqqq author 4/26/2007 |
Hi, you can do it using AfterSuccessfulLogin event on the Events tab. Here is a sample code: where FieldID and UserName are your actual field names, RableName is your actual table name.
|
J
|
Jane 4/27/2007 |
Hi, Sub ListOnLoad() str = "select FieldID from TableName where UserName='" & Session("UserID") & "'" Set rsTemp = server.CreateObject("ADODB.Recordset") rsTemp.open str, dbConnection if not rsTemp.eof then %><script> window.location='./users_edit.asp?editid1=<%=rsTemp("FieldID")%>&editid2=<%=Session("UserID")%>'; </script><% else %><script> window.location='./menu.asp'; </script><% end if End Sub |