Jump to content

Recommended Posts

Ok.... Well I'm new to the whole php thing.... so bare with me!
I am going to be building an affiliate page and I need to make a place on the front page (a form) where I can cookie the affiliate code in....  so the affiliate code is placed on the other pages for the promotional material. I keeping hearing that it is so simple but I'm pretty lost.  ??? If someone could help me, or send me a tutorial (has to be in simple terms)... That would be SOooooooo much help!

[b]REMOVED CONTACT INFO[/b]



well, which do you want, a cookie or a session? Are you wanting the information to be stored only as long as the user is at the website? then you should go the session route. do you wish for the user to be able to go to some other website, close the browser, turn off the computer and come back later to your site, and the information is still there? go the cookie route. or actually, storing the info in a database or flatfile would be better, as you can't be positive the user's computer will allow cookies in the first place.. so yeah, be a little bit more specific in your needs.  How long does this data need to persist?
Well I would say cookies......
Make the cookie stay for a few days but I need the option to be able to remove the cookie also..... so if they accidently type in the wrong affiliate code....they can delete it......

Hope you can help me now :)
You can remove cookies via 2 methods: using a short timeout, or setting the cookie timeout value to some time in the past at some point during the traversal of your site.

All this and more is in the manual... which can be found in my signature.  Go there, and do a search for 'setcookie'.

eh, I'll just give you the link: http://www.php.net/manual/en/function.setcookie.php
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.