kiowa_jackson Posted January 14, 2008 Share Posted January 14, 2008 I have a web form I use to capture leads <form action="https://rws.infusionsoft.com/AddForms/processForm.jsp" method='POST'> <input type="hidden" id="formid" name="formid" value="6"> <input type="hidden" id="type" name="type" value="CustomFormWeb"> <input type='hidden' name='med' value='ppc'> <table> <tr><td colspan=99 style="padding:4px;background-color:#000000;color:#FFFFFF">Contact Information</td></tr> <tr><td>First Name</td><td><input type='text' name='Contact0FirstName' value=''></td></tr> <tr><td>Email</td><td><input type='text' name='Contact0Email' value=''></td></tr> <tr><td colspan=2><input title="" type="submit" name="Submit" id="Submit" value="Submit" class="button np"></td></tr> </table> </form> Is it possible to also make it send an email with the value of a specific variable in the subject line? So if someone finds the form with http://www.myurl.com/form.php?med=ppc Then an email gets sent with the subject line "ppc" (i.e. value of $med) to my email address. Thanks Link to comment https://forums.phpfreaks.com/topic/85980-solved-sending-an-email-with-the-value-of-a-variable-in-the-subject-line/ Share on other sites More sharing options...
rhodesa Posted January 14, 2008 Share Posted January 14, 2008 Depends on the processForm.jsp file. If you can't set the subject with a hidden input field or something along those lines, then you will have to modify the JSP. Link to comment https://forums.phpfreaks.com/topic/85980-solved-sending-an-email-with-the-value-of-a-variable-in-the-subject-line/#findComment-439057 Share on other sites More sharing options...
revraz Posted January 14, 2008 Share Posted January 14, 2008 Sure can if you want to use PHP instead of JSP $to = "[email protected]"; $subject = $_GET['med']; mail ($to, $subject, $body, $header); Fill out $body and $header as required and make sure you sanitize the $_GET variable. Link to comment https://forums.phpfreaks.com/topic/85980-solved-sending-an-email-with-the-value-of-a-variable-in-the-subject-line/#findComment-439058 Share on other sites More sharing options...
kiowa_jackson Posted January 14, 2008 Author Share Posted January 14, 2008 Thanks for the help Link to comment https://forums.phpfreaks.com/topic/85980-solved-sending-an-email-with-the-value-of-a-variable-in-the-subject-line/#findComment-439062 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.