garevn Posted November 2, 2011 Share Posted November 2, 2011 Hello according to this i found here! <%dim numvisitsresponse.cookies("NumVisits").Expires=date+365numvisits=request.cookies("NumVisits")if numvisits="" then response.cookies("NumVisits")=1 response.write("Welcome! This is the first time you are visiting this Web page.")else response.cookies("NumVisits")=numvisits+1 response.write("You have visited this ") response.write("Web page " & numvisits) if numvisits=1 then response.write " time before!" else response.write " times before!" end ifend if%> which result:"You have visited this Web page 2 times before!" ......ets I wonder if there is a way to display the days since last visit, for example:"You have visited this Web page 15 days before! Link to comment Share on other sites More sharing options...
justsomeguy Posted November 2, 2011 Share Posted November 2, 2011 Create another cookie and store the current date in it. When the page loads the cookie will have the previous date until you set it to the new date. Link to comment Share on other sites More sharing options...
garevn Posted November 3, 2011 Author Share Posted November 3, 2011 Thanks man i did that (with a friend's help) and using the DateDiff function i managed to display the different of the dates in hours or days Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.