motarque Posted October 25, 2004 Share Posted October 25, 2004 i've downloaded a form mail program that uses PHP to generate an email containing the specific fields of a form. I do not know how to edit the PHP file (index.php) to "grab" all the fields and email them. The script is working, but right now it doesn't send the appropriate information yet. Here's a look at part of the php file: /***************************************************** ** Add further words, text, variables and stuff ** that you want to appear in the template here. *****************************************************/ $add_text = array( 'txt_additional' => 'Additional', // {txt_additional} 'txt_more' => 'More' // {txt_more} ); I'm guessing this is where I need to enter code to have the script grab the form data. Here's my form: <form action="form_mail/index.php" method="post" form id="contact_form"> <p> </p> <table width="100%" border="1" cellspacing="1" cellpadding="1"> <tr> <td width="49%"><div align="center"><strong><font face="Arial, Helvetica, sans-serif">Personal Information</font></strong></div></td> <td width="51%"><div align="center"><strong><font face="Arial, Helvetica, sans-serif">Interests</font></strong></div></td> </tr> <tr> <td height="180"> <p> <font face="Arial, Helvetica, sans-serif"> <input name="FName" type="text" id="FName"> First Name <br> <input name="LName" type="text" id="LName"> Last Name<br> <input name="Address" type="text" id="Address"> Address<br> <input name="City" type="text" id="City"> City <br> <input name="State" type="text" id="State"> State <input name="Zip_Code" type="text" id="Zip_Code"> Zip Code<br> <input name="Phone" type="text" id="Phone"> Phone No.<br> <input name="Email" type="text" id="Email"> Email</font></p></td> <td><table width="100%" height="184" border="1" cellpadding="1" cellspacing="1"> <tr> <td width="41%">Avoiding Capital Gains</td> <td width="9%"><input type="checkbox" name="checkbox" value="Avoiding Capital Gains"></td> <td width="40%">Charitable Estate Planning </td> <td width="10%"><input type="checkbox" name="checkbox3" value="Charitable Estate Planning"></td> </tr> <tr> <td>Gifts & Receiving A Lifetime Income </td> <td><input type="checkbox" name="checkbox2" value="Gifts & Receiving A Lifetime Income"></td> <td>Endowments </td> <td><input type="checkbox" name="checkbox4" value="Endowments"></td> </tr> <tr> <td>Gifts of Stock,<br> Real Estate, & Commodities</td> <td><input type="checkbox" name="checkbox7" value="Gifts of Stock, Real Estate & Commodities"> </td> <td>Donation Account</td> <td><input type="checkbox" name="checkbox5" value="Donations Accounts"></td> </tr> <tr> <td>Wills vs. Living Trusts </td> <td><input type="checkbox" name="checkbox9" value="Wills vs. Living Trusts"></td> <td>Stewardship In Your Church </td> <td><input type="checkbox" name="checkbox6" value="Stewardship in Your Church"></td> </tr> </table></td> </tr> <tr> <td height="88" colspan="3"> <textarea name="Comments" wrap="VIRTUAL" id="Comments" dir="ltr" lang="en"></textarea> <input type="reset" name="Reset" value="Reset Form"> <input type="submit" name="Submit" value="Submit"></td> </tr> </table> <p> </p> <p> </p> </form> Sorry for all the code, but I would hope that someone could help me with this. Of course I'm using dreamweaver to do this. Basically, I want to include in the email: Name (first, last), address, any checked boxes they choose, and additional comments. Thanks in advance. I appreciate it. Quote Link to comment Share on other sites More sharing options...
TCH-Don Posted October 25, 2004 Share Posted October 25, 2004 With out seeing the home page for the script, I can't help with that one. But a php form mailer should not require you to edit it other than add your e-mail address. Some may only have predefinded fields and could be edited to add more. But if you want a very simple form, Dodsmail will do all the work and you only need edit the 2nd line for your address to make it work. It works by scanning all the post data, so it will work with almost any form as is. Quote Link to comment Share on other sites More sharing options...
motarque Posted October 25, 2004 Author Share Posted October 25, 2004 do you know if it will work with checkboxes as well? Quote Link to comment Share on other sites More sharing options...
TCH-Don Posted October 25, 2004 Share Posted October 25, 2004 Yes, it scans all the posted vars. Quote Link to comment Share on other sites More sharing options...
motarque Posted October 25, 2004 Author Share Posted October 25, 2004 awesome. Thank you for responding. I appreciate it. I'll let ya know how it works. Thumbs Up Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.