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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Azad
Forum Newbie
Posts: 1
Joined: Wed Mar 19, 2008 2:03 am

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

Post 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
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

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

Post 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.
Post Reply