Forum Moderators: phranque
When someone clicks on the link, in the referred by field on the form i would like the name of the person who had the link in their email to appear.
For example, if Sally sends a email to Jim with a link to my site - I would like Sally's name* to appear in the refered by field automatically.
*If not her name, her email address or something that i can link back to her.
How would i go about doing that?
Any help given would be greatly appreciated.
Thanks
You would need to give each person a different link.
Something like this would work..
<a href="http://www.example.com/theform.php?referrer=sally">My Form</a>
<a href="http://www.example.com/theform.php?referrer=bob">My Form</a>
<a href="http://www.example.com/theform.php?referrer=jim">My Form</a>
..etc..
..then the server side script to generate your form would take the 'referer' value, make sure it made sense and then plug it into the value attribute of the appropriate input control, like this...
<input type="text" name="refferer" value="sally">