473,773 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1537

"Fred" <ko********@yah oo.com> wrote in message
news:bb******** *************** ***@posting.goo gle.com...
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******* ***********@new s-server.bigpond. net.au>...
"Fred" <ko********@yah oo.com> wrote in message
news:bb******** *************** ***@posting.goo gle.com...
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********@yaho o.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
1881
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 when I didn't 've a cookie the page still redirect to the user account page. here is the following code : <? $cookie = $_COOKIE;
2
9174
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 performing a redirect when I had left in print "Content-type:text/html\n\n";
5
2088
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" ' also tried with document.cookie="name=mycookie"
4
5296
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 cookie. Here is the code I have now. In the header, I have the following: <SCRIPT language="JavaScript"> var cookieStatus; if (document.cookie.length > 0) { cookieStatus = 'Cookie exists with value ' + document.cookie; } else {
1
2466
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; client wants the results from the quiz to go into the email. The file "quizconfig.js" parses the form-submitted test results & the test results page (quiz1_results.htm), in turn, shows the score. The JS in the quizconfig.js appears to set a...
6
7081
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 "," character. This seems to be incorrectly parsed during GetValues(). A simple example shows it best (there are 2 .aspx pages and an output): AddHeaders.aspx: <%@ Page language="c#" %>
2
2709
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"/> </forms> </authentication> </system.web>
1
2120
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 problems. 1. From another page in the site, when I return to the HOME page, the prompt reappears even though I've already entered a USERNAME. 2. The other pages don't greet the user. The Hi, USERNAME doesn't appear. Could someone offer some...
2
2142
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 work consistently. Sometimes we are getting the latest value set from server in client script, sometimes were are getting a wrong (previously set old) value. In other words, the values in client and server is not in sync. Can anybody suggest...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.