Page 1 of 1

Can i call fields data in Email Subject by field name attrib

Posted: Wed Mar 19, 2008 2:12 am
by Azad
Hi,
PHP Dudes and Freaks

I have a form on my site which i sending with "http://formtoemail.com" Script

i want to collect fields data by fields name attribute and put it into email subject field

example:

<input name="CurrentCampaign" value="Franchise Report" type="hidden" />

I am just newbie in php, waiting for Friend's reply

thanks

Re: Can i call fields data in Email Subject by field name attrib

Posted: Wed Mar 19, 2008 10:47 am
by RobertGonzalez
Moved to PHP - Code.


This is very easily done. The first thing you need to do is understand how forms work. Then you need to understand the $_POST array.

After that it is simply a matter of getting the posted information and using that to construct the email. Have a look at the mail() function or sneak a peak at Swiftmailer for help with mailing.