35 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 50+ members
  • Has sold $100+ on Envato Market
  • Has collected 100+ items on Envato Market
+3 more
TopherWelsh says

Hey there everyone, so what I am looking for is a way kind of the way http://doubleyourdating.com works, where there are opt-in forms everywhere, but after you fill out the form and subscribe, those disappear (I am assuming a cookie is set)

If you can help I would be greatly appreciative!

223 posts
  • Has sold $10,000+ on Envato Market
  • Has referred 10+ members
  • Had an item featured on Envato Market
  • Located in Canada
+3 more
KBRmedia says
Yeah, you can use cookies for that, but I would recommend you store them in a database because cookies are not so reliable. In PHP you can use the following: After submission:
<?php
   setcookie("subscribed",TRUE);

  // Rest of your code
?>
and then to determine whether or not to show the form you can use:
<?php
  if(isset($_COOKIE["subscribed"]) && $_COOKIE["subscribed"]){
   // Don't show the form
}else{
  // Show the form
}
?>

You can also you javascript if you are not familiar with PHP, but I would recommend PHP because it is much faster and easier.

35 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 50+ members
  • Has sold $100+ on Envato Market
  • Has collected 100+ items on Envato Market
+3 more
TopherWelsh says

Thanks so much for the fast reply… I have never messed around with cookies, or storing them in databases, is there a crash course online for a noob like me?

223 posts
  • Has sold $10,000+ on Envato Market
  • Has referred 10+ members
  • Had an item featured on Envato Market
  • Located in Canada
+3 more
KBRmedia says

Thanks so much for the fast reply… I have never messed around with cookies, or storing them in databases, is there a crash course online for a noob like me?
Well it depends on what you want to do, but these two websites are a good starting point http://www.tizag.com/phpT/ & http://www.w3schools.com/php/
by
by
by
by
by
by