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

Help With PHP. Will $ Pay !

Discussion in 'Hire a Freelancer' started by imhill, Aug 19, 2009.

  1. imhill

    imhill Junior Member

    Joined:
    Jun 25, 2009
    Messages:
    146
    Likes Received:
    8
    All right peeps. I need some help with a PHP (i think) code.
    For somene who knows the language it may not take a minute but i have no more than a clue about it.
    I need to append information contained in cookie (a prosper202 subid) to the url so a javascript on the next page will pick that up.

    I already have the javascript and i'll we need to do is to define the variable value so everything comes up together...
    Let me know if you're interested.
    Thank you !
     
  2. justone

    justone Elite Member

    Joined:
    Oct 12, 2008
    Messages:
    1,516
    Likes Received:
    1,037
    Occupation:
    -
    Location:
    Europe
    So you already have a cookie on the clients computer and you want to read it in PHP to use it in a redirect or link ?

    In this case you might just want to do this:
    var_dump($_COOKIE);
    This will dump all the cookies on the website, so you can see if it's there and if it is named as you expected, then you can work with it like with any POST or GET variable you know.

    If you want to create a cookie on the clients browser from within php you can do that using setcookie() (look on php.net for examples)
    Alternatively you can output javascript functions to create a cookie.
     
  3. imhill

    imhill Junior Member

    Joined:
    Jun 25, 2009
    Messages:
    146
    Likes Received:
    8
    Thanks for your reply justone,

    As soon as someone arrives at my site the cookie is dropped. Then he goes to another page ( on the same site) where the java script will pick the info from the url.
    Send me a PM with you IM id so i can show you the entire thing. Think it will be easier...
    Thanks again