bossman Posted November 6, 2009 Share Posted November 6, 2009 Here is what i'm working on... http://www.adobedayevents.com/project_request/project_request.php (yes adobe is a client of ours) if you fill out the form and hit submit, i get a long list of errors and I'm not quite sure what they mean... feel free to fill out the form and hit submit to see the errors. i don't want to blow anyones mind, but here is the code for the form... <form action="send_request.php" method="POST" enctype="multipart/form-data"> <label><strong>Field Marketing Manager:</strong></label><br/> <select name="1_mark_manager"> <option value="Zarnaz Arlia">Zarnaz Arlia</option> <option value="Susanna Church">Susanna Church</option> <option value="Nico Juber">Nico Juber</option> <option value="Amanda Lowe">Amanda Lowe</option> <option value="Shawna McGrath">Shawna McGrath</option> <option value="Lisa Parillo">Lisa Parillo</option> <option value="Ozlem Yilmaz">Ozlem Yilmaz</option> </select> <br/><br/> <label><strong>Company/Customer Name:</strong></label><br/> <input type="text" name="company/customer name" /><br/><br/> <label><strong>If Report prep/upload is required, please indicate the appropriate values below:</strong></label><br/><br/> <label><strong>ICF Source Code:</strong></label><br/><input type="text" name="ICF Source Code" /><br/><br/> <label><strong>Lead Code:</strong></label><br/><input type="text" name="Lead Code" /><br/><br/> <label><strong>Product Interest:</strong></label><br/><input type="text" name="Product Interest" /><br/><br/> <label><strong>Additional Product Interest:</strong></label><br/><input type="text" name="Additional Product Interest" /><br/><br/> <label><strong>Estimated Number of Units:</strong></label><br/> <select name="2_units_number"> <option value="1">1</option> <option value="2-9">2-9</option> <option value="10-20">10-20</option> <option value="21-50">21-50</option> <option value="51-100">51-100</option> <option value="101-500">101-500</option> <option value="501+">501+</option> </select><br/><br/> <label><strong>Timeline for Purchasing:</strong></label><br/> <select name="3_purchase_timeline"> <option value="LESS THAN ONE MONTH">LESS THAN ONE MONTH</option> <option value="1-3 MONTHS">1-3 MONTHS</option> <option value="4-6 MONTHS">4-6 MONTHS</option> <option value="7-9 MONTHS">7-9 MONTHS</option> <option value="10-12 MONTHS">10-12 MONTHS</option> <option value="OVER ONE YEAR">OVER ONE YEAR</option> <option value="NONE">NONE</option> </select><br/><br/> <label><strong>Industry:</strong></label><br/> <select name="4_industry"> <option value="Advertising">Advertising</option> <option value="Agriculture, Fishing and Forestry">Agriculture, Fishing and Forestry</option> <option value="Architecture">Architecture</option> <option value="Book Publisher">Book Publisher</option> <option value="Broadcast/Cable/TV/Radio">Broadcast/Cable/TV/Radio</option> <option value="Catalog Publisher">Catalog Publisher</option> <option value="Computer Hardware/Software">Computer Hardware/Software</option> <option value="Construction">Construction</option> <option value="Corporate In-house Advtg/ Mktg Dept">Corporate In-house Advtg/ Mktg Dept</option> <option value="Direct Marketing/Promotions">Direct Marketing/Promotions</option> <option value="Education (K-12)">Education (K-12)</option> <option value="Engineering and Management Services">Engineering and Management Services</option> <option value="Entertainment">Entertainment</option> <option value="Film/Animation Production">Film/Animation Production</option> <option value="Financial Services">Financial Services</option> <option value="Government - Federal">Government - Federal</option> <option value="Government - Military/Aerospace & Defense">Government - Military/Aerospace & Defense</option> <option value="Government - State/Local">Government - State/Local</option> <option value="Graphic Design">Graphic Design</option> <option value="Healthcare">Healthcare</option> <option value="Higher Education">Higher Education</option> <option value="Hospitality and Food Services">Hospitality and Food Services</option> <option value="Insurance">Insurance</option> <option value="Legal">Legal</option> <option value="Magazine Publisher">Magazine Publisher</option> <option value="Manufacturing">Manufacturing</option> <option value="Membership Organization">Membership Organization</option> <option value="Mining">Mining</option> <option value="Newspaper Publisher">Newspaper Publisher</option> <option value="Non-Profit/Charity">Non-Profit/Charity</option> <option value="Other Industry">Other Industry</option> <option value="Pharmaceuticals/Biotech">Pharmaceuticals/Biotech</option> <option value="Photography">Photography</option> <option value="Printer (No pre-press/production)">Printer (No pre-press/production)</option> <option value="Printing and Publishing">Printing and Publishing</option> <option value="Production/Post Production/Visual Effects">Production/Post Production/Visual Effects</option> <option value="Professional Services">Professional Services</option> <option value="Professional Services (Business)">Professional Services (business)</option> <option value="Professional Services (Technical, Web, IT)">Professional Services (Technical, Web, IT)</option> <option value="Public Relations">Public Relations</option> <option value="Real Estate">Real Estate</option> <option value="Service Provider (pre-press/production">Service Provider (pre-press/production"></option> <option value="Services">Services</option> <option value="Technology/High Tech">Technology/High Tech</option> <option value="Telecommunications">Telecommunications</option> <option value="Transportation">Transportation</option> <option value="Utilities">Utilities</option> <option value="Video Production">Video Production</option> <option value="Web Studio">Web Studio</option> <option value="Web Studio/Interactive Agency">Web Studio/Interactive Agency</option> <option value="Wholesale/Retail Trade">Wholesale/Retail Trade</option> </select><br/><br/> <label><strong>Employee Range:</strong></label><br/> <select name="5_employee_range"> <option value="1-9">1-9</option> <option value="10-99">10-99</option> <option value="100-499">100-499</option> <option value="500-999">500-999</option> <option value="1000-4999">1000-4999</option> <option value="5000+">5000+</option> <option value="NO ANSWER">NO ANSWER</option> </select><br/><br/> <label><strong>Revenue Range:</strong></label><br/> <select name="6_revenue_range"> <option value="Less than $50MM">Less than $50MM</option> <option value="$50MM to $100MM">$50MM to $100MM</option> <option value="$101MM to $200MM">$101MM to $200MM</option> <option value="$201MM to $500MM">$201MM to $500MM</option> <option value="Over $500MM">Over $500MM</option> </select><br/><br/> <label><strong>Required Due Date:</strong><br/> Standard turnaround is 2-3 working days.</label><br/> <select name="7_month"> <option value="January">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option> </select> <select name="8_day"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <select name="9_year"> <option value="2009">2009</option> <option value="2010">2010</option> <option value="2011">2011</option> </select><br/><br/> <label><strong>Please indicate any additional<br/>comments and/or special instructions:</strong></label><br/> <textarea name="additional_comments" cols="55" rows="6"></textarea><br/><br/> <input type="submit" value="Project Request" /> </form> and here is the send_request.php page that compiles the form values.... <?php $to = 'rkettering@jpenterprises.com'; $subject = 'Project Request Test'; $from = 'opusrandy@gmail.com'; $field_mark_manager = $_POST['1_mark_manager']; $comp_cust_name = $_POST['company/customer name']; //retrieve checkbox variable here $icf_source_code = $_POST['ICF Source Code']; $lead_code = $_POST['Lead Code']; $product_interest = $_POST['Product Interest']; $add_product_interest = $_POST['Additional Product Interest']; $number_of_units = $_POST['2_units_number']; $purchase_timeline = $_POST['3_purchase_timeline']; $industry = $_POST['4_industry']; $employee_range = $_POST['5_employee_range']; $revenue_range = $_POST['6_revenue_range']; $due_date_month = $_POST['7_month']; $due_date_day = $_POST['8_day']; $due_date_year = $_POST['9_year']; $additional_comm = $_POST['additional_comments']; $message = 'Field Marketing Manager: $field_mark_manager<br/> Company/Customer Name: $comp_cust_name<br/> ICF Source Code: $icf_source_code<br/> Lead Code: $lead_code<br/> Product Interest: $product_interest<br/> Additional Product Interest: $add_product_interest<br/> Number of Units: $number_of_units<br/> Purchase Timeline: $purchase_timeline<br/> Industry: $industry<br/> Employee Range: $employee_range<br/> Revenue Range: $revenue_range<br/> Due Date: $due_date_month $due_date_day, $due_date_year<br/> Additional Comments: $additional_comm'; if(mail($to, $subject, $headers, $message, "From: $from")) echo "Mail sent"; else echo "Mail send failure - message not sent"; ?> if anybody can help me trouble shoot these errors i would really appreciate it. I'm not a veteran programmer and am not sure what the bottom errors mean. I don't have access to my php.ini file, and I can't find any resources that explain what the 'SMTP' port is or how to format it into my line 38 as it explains. Can anybody give me some direction or assistance? Thank you . Quote Link to comment Share on other sites More sharing options...
bossman Posted November 6, 2009 Author Share Posted November 6, 2009 here's the errors for anyone who doesn't feel like fillng out the form to see them... Notice: Undefined index: company/customer name in D:\WebRoot\Domains\adobedayevents.com\wwwroot\project_request\send_request.php on line 8 Notice: Undefined index: ICF Source Code in D:\WebRoot\Domains\adobedayevents.com\wwwroot\project_request\send_request.php on line 10 Notice: Undefined index: Lead Code in D:\WebRoot\Domains\adobedayevents.com\wwwroot\project_request\send_request.php on line 11 Notice: Undefined index: Product Interest in D:\WebRoot\Domains\adobedayevents.com\wwwroot\project_request\send_request.php on line 12 Notice: Undefined index: Additional Product Interest in D:\WebRoot\Domains\adobedayevents.com\wwwroot\project_request\send_request.php on line 13 Notice: Undefined variable: headers in D:\WebRoot\Domains\adobedayevents.com\wwwroot\project_request\send_request.php on line 38 Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\WebRoot\Domains\adobedayevents.com\wwwroot\project_request\send_request.php on line 38 Mail send failure - message not sent Quote Link to comment Share on other sites More sharing options...
JAY6390 Posted November 6, 2009 Share Posted November 6, 2009 it's because you've not set up the SMTP server. To get rid of the undefined indexes add error_reporting(E_ALL ^ E_NOTICE); at the top of your php Quote Link to comment Share on other sites More sharing options...
mrMarcus Posted November 6, 2009 Share Posted November 6, 2009 the very last paragraph was the only relevant information to the problem at hand. pretty self-explanatory .. "Failed to connect to mailserver ..." you need to have access to a mail server .. if you are signed up with a hosting company, get their mail server credentials, otherwise, you're going to need to install a mail server on your computer. Quote Link to comment Share on other sites More sharing options...
lemmin Posted November 6, 2009 Share Posted November 6, 2009 Undefined index just means the index is undefined. Do a print_r($_POST) in your send_request.php file to see what IS defined. Quote Link to comment Share on other sites More sharing options...
bossman Posted November 6, 2009 Author Share Posted November 6, 2009 both of your answers were very helpful. I will contact our host and see what they can do, thank you so much. Quote Link to comment Share on other sites More sharing options...
shamuraq Posted November 6, 2009 Share Posted November 6, 2009 Reply on the fly... I am not sure about your scripting since i'm mobile and cannot fathom the codes. But i can however assist you A BIT in the email server part... Since your sending via gmail(i assumed the "from" is you), then you need to set an smtp port to 587 using TLS connection... Google "PHP gmail setting"... I'll check back in again when i get back home... Hope it helps Quote Link to comment Share on other sites More sharing options...
bossman Posted November 6, 2009 Author Share Posted November 6, 2009 well thats not the permanent 'from', i just put that there as a test, i wasnt sure what to put there actually. my supervisor is in the process of getting me the mail server connection, but i would appreciate it u check back on this post cuz i might run into more issues. Thanks for your help and generosity Quote Link to comment Share on other sites More sharing options...
shamuraq Posted November 6, 2009 Share Posted November 6, 2009 i'll do my best. I hope you won't have to administer the mail server and that your company gets it with an admin support or u'll have a dump load to worry about SSL/TLS (i mean you have to use these security features lest ADOBE(god screw them) will screw your company for any breach of security) Quote Link to comment Share on other sites More sharing options...
bossman Posted November 9, 2009 Author Share Posted November 9, 2009 ok i have received my information for my mail server... but im not sure what to do with it... its... mail.adobedayevents.com and our $from address is admin@adobedayevents.com will i need to get into the hosting package to configure anything? or is this all the information i need to get this thing working? Quote Link to comment Share on other sites More sharing options...
bossman Posted November 9, 2009 Author Share Posted November 9, 2009 anyone? 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.