Anyone Has Magic Buy Button Code

by nik555
2 replies
  • WEB DESIGN
  • |
i need a buy button to appear after a certain period of time on my video sales page. i found the code online, it works but i need one addition, i need to button to show up right away for the visitors who previously viewed it.
For example if they refresh the page they don't have to watch the whole video again to see the buy button.

Anyone can suggest a code for that?
thanks
#button #buy #code #magic
  • Profile picture of the author kevbo22
    Use a cookie:

    setcookie (string $name, string $value,int $expire = 0)

    what setcookie does is creates a cookie under the name of $name with a value of $value, this is the most important part of the method. the 3rd parameter is a unix timestamp of when the cookie will expire

    We want to detect whenever a user has already visited our site, we can do this with the following code:

    if (isset($_COOKIE['visited'])) { // cookie set, so it's a returning visitor // display page for returning visitors } else { // cookie not set, so let's "tag" this visitor setcookie('visited', 1); // display page for first time visitors }
    Signature

    The best path to prosperity is free market capitalism!

    {{ DiscussionBoard.errors[8604240].message }}
  • Profile picture of the author blogfreakz
    to learn how cookie works.. visit this link, good luck!

    PHP setcookie() Function
    {{ DiscussionBoard.errors[8606589].message }}

Trending Topics