Page 1 of 1

Need coding help for a charity website!

Posted: Tue Feb 13, 2007 8:37 am
by omanush
Hello everyone :)!

I maintain a non-profit charity website. Many of it's volunteers refers visitors to us from their personal websites. Here is the scenarios of what I'm trying to do:

-----

1. Http://www.volunteer.com refers John Doe to our site using this link http://www.charity.com/?refersite=volunteer.com. When John Doe sends us an e-mail via our web form, a text-field named refersite is automatically filled with "volunteer.com". And also the field is disabled/not-editable, so John Doe cannot change the referral information.

2. Few days later John Doe again visits our website to send us another email inquire. But this time he came through a different link http://www.charity.com/?refersite=devnetwork.net, therefore the old referral information "volunteer.com" was replaced with "devnetwork.net".

3. John is now using a different computer and visits our website directly from his browser by typing the site address http://www.charity.com or http://www.charity.com/?refersite= (no information). This time when he sends an email using the web form, the refersite field is blank and editable. So he decides to type "google.com" manually in that field.

-----

That's all. Many thanks in advance for your help.

By the way, the website is made with php and no database.

Posted: Tue Feb 13, 2007 8:41 am
by feyd
I'm not seeing a question in there.. can you define one?

Posted: Tue Feb 13, 2007 8:47 am
by omanush
Thanks for your reply.

The question is, the scenarios I mentioned above, is it possible to do and how? I need someone who can help me with the codes to make this work.

Posted: Tue Feb 13, 2007 9:05 am
by feyd
Are you wanting someone to do the work for you or are you looking for tips and nudges?

Posted: Tue Feb 13, 2007 9:25 am
by omanush
Actually I’m looking for some references, like how to set cookie from the URL string value (http://www.charity.com/?[b]refersite=volunteer.com[/b]), retrieve and display cookie data in a form field, overwrite cookie etc.

At this moment I’m not able to offer any fee or hire someone to do the work as I, myself also voluntarily working for the website. So I would highly appreciate if you could give me any tips, advice, reference or link to any website that has the information I need in order to complete the task.
Thanks.

Posted: Tue Feb 13, 2007 9:33 am
by feyd
There's no need for a cookie that I can see, but the information in $_GET will contain data generated from the URL.

Posted: Tue Feb 13, 2007 11:44 am
by omanush
I got it working finally. I had to use cookie anyway to keep referral information on client-side for 365 days.

Thanks anyway. :)

Posted: Tue Feb 13, 2007 6:08 pm
by RobertGonzalez
What good is the cookie if the user can access your site from multiple computers?