CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Expiry date

Print topic Send  topic

Author Message
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"

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.