I would like to capture data from my friends. I'm going to use a page on my website with a form. I'll send my friends a link to the page such as http://www.mysite.com/surveypage.htm?friend=john.
When the friend hits my page using this url I would like firstly to show a message "Hello John"
and secondly when he has entered his age on the form to send me a mail to email@example.com which says for instance
User = John
I'll pick up the mail and update my database.
So far I have created a webpage
<form action="one.php?" method="post"> Age: <input type="text" name="age" /> <input type="submit" /> </form>
and a php script
<?php $ref = getenv("HTTP_REFERER"); echo $ref; I dont know how to parse the string and extract John or even if this would be the best way of doing it ?>
I have a feeling that I'm close to the solution but yet not close enough !