473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Need cookie & script

I've check all the info I can find on cookies and I have gotten some
idea of how to set a cookie, set the expiration, and get the cookie
value.

But I need help bringing it all together to accomplish what I need to
do.

When someone first visits a signup page, I want them to see a popup
that says they can sign up within the next 30 days without having to
pay an appication fee. Then each time they revisit over the next 30
days, the popup displays a message that says "X days left to save."

Finally, after the 30 days expires, they need to go to a different
signup page...one that contains and requires the signup fee.

I get the set cookie concept. Does the popup get generted within the
get cookie script? And what about sending people to the other page
after 30 day? Is that a different script? Do I need a more persistant
cookie to distinguish between new visitors and someone who has already
hit the page and did not signup within 30 days?

All help / suggestions appreciated!
Jul 20 '05 #1
5 1515

"Fred" <ko********@yahoo.com> wrote in message
news:bb**************************@posting.google.c om...
I've check all the info I can find on cookies and I have gotten some
idea of how to set a cookie, set the expiration, and get the cookie
value.

But I need help bringing it all together to accomplish what I need to
do.

When someone first visits a signup page, I want them to see a popup
that says they can sign up within the next 30 days without having to
pay an appication fee. Then each time they revisit over the next 30
days, the popup displays a message that says "X days left to save."

Finally, after the 30 days expires, they need to go to a different
signup page...one that contains and requires the signup fee.

I get the set cookie concept. Does the popup get generted within the
get cookie script? And what about sending people to the other page
after 30 day? Is that a different script? Do I need a more persistant
cookie to distinguish between new visitors and someone who has already
hit the page and did not signup within 30 days?

All help / suggestions appreciated!


You may need to rething this security. I could appear to become a new user
after 30 days by simply deleting your cookie.
Jul 20 '05 #2
<snip>
: Then each time they revisit over the next 30
: days, the popup displays a message that says "X days left to save."
</snip>
: All help / suggestions appreciated!

It's better to use a serverside script that is IP dependent.
Else you can be shure that if they want to sign up, they will delete the
cookie.
Or maybe they have a clean up program that does that every time for them.

But well, I don't think it might be a big problem if they will get the same
"discount" if they sign-up after 40 days, is it?

Wouter
Jul 20 '05 #3
"Richard Formby" <rf***@cueword.com.au> wrote in message news:<Jn******************@news-server.bigpond.net.au>...
"Fred" <ko********@yahoo.com> wrote in message
news:bb**************************@posting.google.c om...
I've check all the info I can find on cookies and I have gotten some
idea of how to set a cookie, set the expiration, and get the cookie
value.

But I need help bringing it all together to accomplish what I need to
do.

When someone first visits a signup page, I want them to see a popup
that says they can sign up within the next 30 days without having to
pay an appication fee. Then each time they revisit over the next 30
days, the popup displays a message that says "X days left to save."

Finally, after the 30 days expires, they need to go to a different
signup page...one that contains and requires the signup fee.

I get the set cookie concept. Does the popup get generted within the
get cookie script? And what about sending people to the other page
after 30 day? Is that a different script? Do I need a more persistant
cookie to distinguish between new visitors and someone who has already
hit the page and did not signup within 30 days?

All help / suggestions appreciated!


You may need to rething this security. I could appear to become a new user
after 30 days by simply deleting your cookie.


It's OK if someone deletes the cookie. The whole idea is to use the
popup & 30 day offer to encourge sign up. If someone wants to delete
cookie, so be it. Just like if they hit the site from another machine
to get another 30 day offer.

That said, can you offer any suggestions on script(s) that will
accomplish what I need to do?
Jul 20 '05 #4
I have read the following message from ko********@yahoo.com (Fred)
and have decided to lend my vast knowledge.

The writer said:
I've check all the info I can find on cookies and I have gotten some
idea of how to set a cookie, set the expiration, and get the cookie
value.

But I need help bringing it all together to accomplish what I need to
do.

When someone first visits a signup page, I want them to see a popup
that says they can sign up within the next 30 days without having to
pay an appication fee. Then each time they revisit over the next 30
days, the popup displays a message that says "X days left to save."

Finally, after the 30 days expires, they need to go to a different
signup page...one that contains and requires the signup fee.

I get the set cookie concept. Does the popup get generted within the
get cookie script? And what about sending people to the other page
after 30 day? Is that a different script? Do I need a more persistant
cookie to distinguish between new visitors and someone who has already
hit the page and did not signup within 30 days?

All help / suggestions appreciated!


and my reply is:
What you want to do is fairly simple and I'm sure someone will soon
point out how to do it but what if...

If someone turned off cookies or just deleted them after visiting your
page couldn't they just go there forever?

How would you indicate that they paid? Modify the cookie? What if they
delete it by mistake?

I think whatever you want to do must be at the server end.

--
Dennis M. Marks
http://www.dcs-chico.com/~denmarks/
Replace domain.invalid with dcsi.net
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 20 '05 #5

: It's OK if someone deletes the cookie. The whole idea is to use the
: popup & 30 day offer to encourge sign up. If someone wants to delete
: cookie, so be it. Just like if they hit the site from another machine
: to get another 30 day offer.
:
: That said, can you offer any suggestions on script(s) that will
: accomplish what I need to do?

Such script sould be freely available via www.javascriptsource.com
(or just copy it from the page that gave you the idea).

Wouter
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Alexandre | last post by:
What's the best I can do to solve my trouble : I got a simple page index-tmp who include a code snippet who test if a cookie exist and if yes redirect to the user account page but the trouble is...
2
by: bagsmode | last post by:
Hi, I'm trying to set a session cookie and then redirect, however I get the error: Status: 302 Moved Location: /index.cgi I thought I recall getting an error like this when I first tried...
5
by: Carl | last post by:
Hi, I want to pass the value of the cookie created in VB to ASP. This doesn't work. Any idea? Thanks Carl .... <script language=vbscript> document.cookie="mycookie" '...
4
by: Shannon Jacobs | last post by:
I'm doing some trivial surveys, and I want to know if the same user answers twice. Can't really know that, but at least I thought I could check for the same browser/computer combination by using a...
1
by: Display Name | last post by:
Used one of these canned scripts to set up a JS quiz but not before having used another canned PHP script for "Tell your friend about this Web page!" sort of thing. Now i've gotta integrate them;...
6
by: Jason Collins | last post by:
There seems to be an inconsistency (bug?) in the way the Set-Cookie header is handled by the WebHeaderCollection. That is, the values of Set-Cookie, when an Expires is specified, contain the ","...
2
by: rn5a | last post by:
A web.config file has the following code: <configuration> <system.web> <authentication mode="Forms"> <forms name="NETConnectCookie" loginUrl="Login.aspx"> <credentials passwordFormat="SHA1"/>...
1
by: TokyoJ | last post by:
I use a popup / prompt requesting the visitor to enter a USERNAME so after the user clicks SUBMIT on the prompt all the pages in the site should greet the user with Hi, USERNAME. But there are two...
2
by: arijitdas | last post by:
Hi, We have an ASP.NET 2.0 web application where we want to share few user specific data between server and client side code using cookie. We are seeing a very strange behavior that it does not...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.