1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php link array+cookie

Discussion in 'PHP & Perl' started by golk75, Aug 19, 2012.

  1. golk75

    golk75 Regular Member

    Joined:
    Jul 25, 2010
    Messages:
    228
    Likes Received:
    25
    Occupation:
    Here
    Location:
    Top of the World
    I need to be able to have a link that can tell if it has already been clicked and if it has it needs to load a different link from an array of links, if this possible at all?
     
  2. Orbit143

    Orbit143 Senior Member

    Joined:
    Aug 8, 2010
    Messages:
    893
    Likes Received:
    588
    Location:
    /home
    For each visitor individually, or once it's clicked by anyone it changes parmanently for everyone?
    This is for each individually:

    Also you need to create that cookie the the link is clicked, if the link points to a php script then you can use the script to create a cookie

    if not, you are gonna have to use javascript directly triggered by clicking (onlick) that link.
     
    • Thanks Thanks x 1
  3. shubhamm

    shubhamm Junior Member

    Joined:
    Jan 25, 2010
    Messages:
    107
    Likes Received:
    25
    Occupation:
    Developer
    Location:
    BHW
    you can use any id from username and password if you have & then store it in mysql database

    if you don't have any id then Cookie will be good.
     
  4. golk75

    golk75 Regular Member

    Joined:
    Jul 25, 2010
    Messages:
    228
    Likes Received:
    25
    Occupation:
    Here
    Location:
    Top of the World
    thanks guys I will start trying to put this code together.
    and yes it will be for each visitor individually