CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Page accessed only after some days - Problem -Help

Print topic Send  topic

Author Message
Kunika
Posted: 03/03/2002, 12:35 AM

Hi all

I am develop an application in which i want to give the access a particular page "SPECIAL OFFER", only when, if a person who logged, joined the forum atleast 15 days before, when he/she try to open this page befor that he/she redirect to another page called "MESSAGE".

I want the Information about the joining the forum is obtained from the message database when he throw the first message in the forum.

How can I do this? In CC using ASP, I am using MS-Access 2000 db.

Please help me.

Kunika

Andrew B
Posted: 03/03/2002, 5:08 PM


You would need to keep track of the date that the person joined the forum. Then, get that date from the DB, compare it to todays date using DateDiff(), and do whatever you need to based on that result.

You can use code similar to this to hide the link, and to redirect if they manage to get there anyway.

dateJoined = dlookup("members", "joindate", "id=" & Session("UserID")
if (DateDiff("d", Now(), dateJoined) < 15) then
'do stuff
response.redirect "message.asp"
'- or -
SetVar "LinkToPage", "" 'to hide the link to the page to non-elligable ppl
end if

--- msdn DateDiff() function reference ---
http://msdn.microsoft.com/library/default.asp?url=/libr...fctDateDiff.asp
Kunika
Posted: 03/03/2002, 9:18 PM

Thanks Andrew B , for reply.

But there is another problem of mine - There are many message posted in the
forum during last fifteen days by many users and they are saved inthe database.

How I trace the date when first record was posted by the person who logged-in?

Please Help me in this.

   


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.