Need coding help for a charity website!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
omanush
Forum Newbie
Posts: 9
Joined: Thu Jul 24, 2003 8:58 pm
Location: Montreal, QC
Contact:

Need coding help for a charity website!

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'm not seeing a question in there.. can you define one?
omanush
Forum Newbie
Posts: 9
Joined: Thu Jul 24, 2003 8:58 pm
Location: Montreal, QC
Contact:

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Are you wanting someone to do the work for you or are you looking for tips and nudges?
omanush
Forum Newbie
Posts: 9
Joined: Thu Jul 24, 2003 8:58 pm
Location: Montreal, QC
Contact:

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
omanush
Forum Newbie
Posts: 9
Joined: Thu Jul 24, 2003 8:58 pm
Location: Montreal, QC
Contact:

Post 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. :)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

What good is the cookie if the user can access your site from multiple computers?
Post Reply