Subscribe now and choose from over 30 free gifts worth up to £49 - Plus get £25 to spend in our shop
I posted up earlier about creating a HTML form that I could then email me the details.
I have setup the form and have various fields i.e. First Name, Last Name, Department, Job Title etc.
Now using the basic mailto command in HTML I got the form to email me all the data however it was using my outlook to send the data and outlook was complaining of viruses etc.
So I have used a php mail script to email my form data, however I have come a bit unstuck.
All the examples I have found use the basic comment field on a html form to populate the body of the email.
However I want ALL information in my form to be populated into the body of the email not just the comment box. Is there a way of doing this or do I have to use the $_REQUEST command to pull across all the fields in my form?
Have a look [url= http://www.thesitewizard.com/wizards/feedbackform.shtml ]here[/url]
You should find something php you can adapt to suit your needs.
SB
$_REQUEST is an associative array so you can just iterate over it to print every value if you like. It's not recomended as there may be other data in there (especially if you are using a framework for example) but it might do for your requirements
<?php
foreach ($_REQUEST as $key => $value) {
echo "{$key} - {$value}\n";
}
?>
usually though you would address each variable as required from $_REQUEST e.g. echo "{$_REQUEST['FirstName']}\n";
or do I have to use the $_REQUEST command to pull across all the fields in my form?
the $_REQUEST[] array will have an entry for each field in the form, like
$_REQUEST['name'],$_REQUEST['position'] etc using the names of the fields as indices
