Kweilo Posted January 21, 2011 Share Posted January 21, 2011 I have a website for ordering business cards, and have encountered an error with either the HTML or PHP coding. The website has a form with several text boxes and drop-down menus to fill in the order form, and at the end after clicking the "submit" button, it generates an e-mail through a PHP script that sends the order form to the printer of the business cards. For some reason, whenever a user has a "job title" with the word "specialist" in it, the e-mail never gets sent. I removed all job titles from the one drop-down menu, to try and fix the problem, but now when users type "specialist" in the comments box at the bottom of the form, that blocks the e-mail from being sent as well. I have tried looking online for possible reasons why this one word would cause such a problem, but have not found the answer yet. Does anyone on this forum know why the word "specialist" would cause this issue, or know where I can look for a solution? If you can help me, that would be greatly appreciated. Thanks! Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted January 21, 2011 Share Posted January 21, 2011 How do you know it isn't sent, rather than being squashed by a spam filter? Quote Link to comment Share on other sites More sharing options...
Kweilo Posted January 23, 2011 Author Share Posted January 23, 2011 I don't know why it would get blocked by a spam filter. The form works with no problems, and sends the e-mail to the printer as long as the word "specialist" is not selected in any of the drop-down menus or text fields. It seems that only when someone chooses a job title from the drop-down menu including "specialist" in the job title, does the form not work or send an e-mail to the printer. I have tried it using Internet Explorer and Firefox, and it does not work in either browser. Would it help if I post the PHP code to see if somebody can figure out what is wrong, or maybe there is a better way using different PHP code to create the e-mail and sends the form data. I am at a complete loss as to why this is happening, and would greatly appreciate any help I can get to fix the problem. Thanks, Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted January 23, 2011 Share Posted January 23, 2011 Yes, posting the code is probably you're best bet . . . Quote Link to comment Share on other sites More sharing options...
Kweilo Posted January 23, 2011 Author Share Posted January 23, 2011 Here is the PHP code that I am using to get the form data and send the e-mail: <?php $office = $_REQUEST['office'] ; $location = $_REQUEST['location'] ; $division = $_REQUEST['division'] ; $address1 = $_REQUEST['address1'] ; $address2 = $_REQUEST['address2'] ; $mainphone = $_REQUEST['mainphone'] ; $mainfax = $_REQUEST['mainfax'] ; $name = $_REQUEST['name'] ; $designation = $_REQUEST['designation'] ; $job_title = $_REQUEST['job_title'] ; $job_title2 = $_REQUEST['job_title2'] ; $department = $_REQUEST['department'] ; $status = $_REQUEST['status'] ; $phone = $_REQUEST['phone'] ; $extension = $_REQUEST['extension'] ; $fax = $_REQUEST['fax'] ; $email = $_REQUEST['email'] ; $cell = $_REQUEST['cell'] ; $contact = $_REQUEST['contact'] ; $instructions = $_REQUEST['instructions'] ; mail( "sample1@email.com", "Business Card Order Form Submitted: $office", "Location: $location\nDivision: $division\nAddress: $address1\n$address2\nMain Phone No.: $mainphone\nMain Fax No.: $mainfax\nEmployee's Name: $name\nProfessional Designation: $designation\nJob Title: $job_title\nJob Title (Other): $job_title2\nDepartment: $department\nPartner Status: $status\nPhone No.: $phone\nExtension: $extension\nFax Number: $fax\nEmail: $email\nCell No.: $cell\nComments: $instructions", "From: $contact" ); header( "Location: http://www.sample.net/confirm.html" ); mail( "sample2@email.com", "Business Card Order Form Submitted: $office", "Location: $location\nDivision: $division\nAddress: $address1\n$address2\nMain Phone No.: $mainphone\nMain Fax No.: $mainfax\nEmployee's Name: $name\nProfessional Designation: $designation\nJob Title: $job_title\nJob Title (Other): $job_title2\nDepartment: $department\nPartner Status: $status\nPhone No.: $phone\nExtension: $extension\nFax Number: $fax\nEmail: $email\nCell No.: $cell\nComments: $instructions\nNote: Please send a copy of the Business Card proof to preciseservices@rogers.com", "From: $contact" ); header( "Location: http://www.sample.net/confirm.html" ); ?> Quote Link to comment Share on other sites More sharing options...
litebearer Posted January 23, 2011 Share Posted January 23, 2011 1. please use the php tags when showing code. 2. may we also see the actual form with specialist being used? 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.