james
|
Posted: 11/12/2003, 4:21 PM |
|
I want to setup an expiry date so if the user logs in and there expiry is up they are redirected to another page or the login fails with the error. Does anyone know how this is done in ASP.
Thanks
|
|
|
james
|
Posted: 11/12/2003, 5:46 PM |
|
I added a few lines of code in the common.asp - Works well, if the expiry date is up it redirect to the renew form. If anyone is interested I'll post it here.
|
|
|
Sonny
|
Posted: 11/13/2003, 4:14 AM |
|
Post it please!
|
|
|
james
|
Posted: 11/13/2003, 7:07 PM |
|
SQL = "SELECT userid, groupid, exp_date FROM users WHERE username='" & Replace(Login, "'", "''") & "' AND pass='" & Replace(Password, "'", "''") & "'"
Set RecordSet = Connection.Execute(SQL)
Result = NOT RecordSet.EOF
If Result Then
Session("UserID") = RecordSet("userid")
Session("UserLogin") = Login
Session("GroupID") = RecordSet("groupid")
Session("exp_date") = RecordSet("exp_date")
If Session("exp_date") < now() then _
Response.Redirect "/renew.asp"
|
|
|
|