Hi
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 mailsurvey@mysite.com which says for instance

User = John
Age =21

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 !

This helped me so much. I had been trying to make single-record queries without an array, and it was just ridiculous. Thanks a million times over.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.