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!

244 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?

244 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/

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by