slickboyj Posted April 26, 2007 Share Posted April 26, 2007 Good Morning All, I'm trying to edit a email form that is about 30+ fields. Right now the form only inserts the data to a MySQL DB. What I would like to add is an email (mailto) feature that sends the entered data from the form to an email address as well as add it to the DB at the same time. I'm not a beginner in PHP MySQL but not quite a novice just yet. Any suggestions or articles would be great appreciated. Thanks Joe Link to comment https://forums.phpfreaks.com/topic/48773-php-mailto-form-multiple-fields-mysql/ Share on other sites More sharing options...
taith Posted April 26, 2007 Share Posted April 26, 2007 you'd just run it as 2 seperate tasks... $data='text'; mysql_query("INSERT .... "); mail([email protected], $data, $subject, $headers); Link to comment https://forums.phpfreaks.com/topic/48773-php-mailto-form-multiple-fields-mysql/#findComment-239007 Share on other sites More sharing options...
slickboyj Posted April 26, 2007 Author Share Posted April 26, 2007 I guess what I'm confused with is how do I do use the mailto to mail multiple data fields. example.. name_______ town________ state_________ p.number___________ field1_______________ field2_______________ field.......................... field15_______________ I would like to have all the field data parsed to the email body. I'm not understanding where the variables for the fields are put in the php code. I'm sorry, if I'm not explaining it properly. but I'm a lil confused still. Thank for help. Joe Link to comment https://forums.phpfreaks.com/topic/48773-php-mailto-form-multiple-fields-mysql/#findComment-239014 Share on other sites More sharing options...
taith Posted April 26, 2007 Share Posted April 26, 2007 $text.='Name: '.$_POST[name]; $text.='<br>Town: '.$_POST[town]; . . . email(email,$text,$subject,$headers); Link to comment https://forums.phpfreaks.com/topic/48773-php-mailto-form-multiple-fields-mysql/#findComment-239019 Share on other sites More sharing options...
slickboyj Posted April 26, 2007 Author Share Posted April 26, 2007 I'm giving it a try now. thank you! Link to comment https://forums.phpfreaks.com/topic/48773-php-mailto-form-multiple-fields-mysql/#findComment-239022 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.