35 posts
  • Bought between 100 and 499 items
  • Contributed a Blog Post
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 100 and 1 000 dollars
  • United States
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!

194 posts
  • Canada
  • Sold between 10 000 and 50 000 dollars
  • Bought between 1 and 9 items
  • Referred between 10 and 49 users
  • Has been a member for 2-3 years
  • Exclusive Author
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
  • Bought between 100 and 499 items
  • Contributed a Blog Post
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 100 and 1 000 dollars
  • United States
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?

194 posts
  • Canada
  • Sold between 10 000 and 50 000 dollars
  • Bought between 1 and 9 items
  • Referred between 10 and 49 users
  • Has been a member for 2-3 years
  • Exclusive Author
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