PHP - New To Php - Contact Form Not Sending Email.
Hello,
I'm new to PHP but i am quite good with javascript programming etc so i'm just getting to terms with using PHP. I've made a contact form with an IF statement that will display confirmation within my page upon post. (I'm not even sure if this logic is right however). The form seems to submit but doesn't show the confirmation message and doesn't send an email to my webserver. Code: [Select] <body> <div id="outer"> <div id="topbar"> </div> <div id="topback"> <img src="images/logo.png" class="logo" /> <a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('hemcurrent','','images/homecurrent.png',1)"><img src="images/home.png" class="logo hem" name="hemcurrent" /></a> <a href="Tjanster.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('tjanstercurrent','','images/tjanstercurrent.png',1)"><img src="images/tjanster.png" class="logo links" name="tjanstercurrent" /></a> <a href="OmOss.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('omosscurrent','','images/omosscurrent.png',1)"><img src="images/omoss.png" class="logo links" name="omosscurrent" /></a> <a href="Referenser.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('referensercurrent','','images/referensercurrent.png',1)"><img src="images/referenser.png" class="logo links" name="referensercurrent" /></a> <a href="KontaktaOss.html"><img src="images/kontaktaosscurrent.png" class="logo links" /></a> </div> <div id="maincontent"> <h1>Nordströms HRK AB - </h1> <h2 class="kontaktaoss"> KONTAKTA OSS</h2> <?php if ($_POST["email"]<>'') { $ToEmail = 'michel@hissorulltrappskonsulter.se'; $EmailSubject = 'Webform Hissorulltrapp'; $mailheader = "From: ".$_POST["email"]."\r\n"; $mailheader .= "Reply-To: ".$_POST["email"]."\r\n"; $mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n"; $MESSAGE_BODY = "Name: ".$_POST["name"].""; $MESSAGE_BODY .= "Email: ".$_POST["email"].""; $MESSAGE_BODY .= "Comment: ".nl2br($_POST["comment"]).""; mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure"); ?> Your message has been sent <?php } else { ?> <form name="form" id="form" action="KontaktaOss.php" method="post"> <select name="sDepartment" onchange="MM_jumpMenu('parent',this,0)" class="selectDepartment"> <option>Hiss och rulltrappstjänster</option> <option>Teknisk support</option> </select> <input type="text" name="subject" id="name" class="txtDepartment" /> <textarea name="tComments" id="comment" class="txtComments"></textarea> <input type="text" name="tEmail" id="email" class="txtEmail" /> <input type="image" src="images/submit.png" class="bSubmit" value="send" /> <input type="image" src="images/reset.png" class="bReset" /> </form> <?php }; ?> <p class="kontaktaossdetails"><b>Information:</b><br /> Stationsvägen 4C<br /> Täby 187 30 <br /> Telefon: 0702698981<br /> bjorn@hissotrulltrappskonsulter.se<br /> michel@hissorulltrappskonsulter.se<br /> <b>Teknisk Support:</b><br /> joel@hissorulltrappskonsulter.se</p> </div> <div id="tagline"><img class="quote1" src="images/quote1.png" /> <div id="elem0" class="toBeFaded tagline"><p> Björn har under sin anställning utvecklat en gedigen kompetens inom sitt arbetsområde. Han har i sin roll visat stort engagemang för sina arbetsuppgifter.. -<em> Harry Plogbäck, Teknisk förvaltningschef - AB Storstockholms Lokaltrafik</em></p></div> <div id="elem1" class="toBeFaded tagline"><p>Behovet av kvalitetskontroller erinrar sig från värdet av en kontrollverksamhet jämtemot de som utför reparationer och service. Det skapar även möjligheten... -<em> Björn Anderson, Teknisk förvaltningschef - AB Storstockholms Lokaltrafik</em></p></div> <div id="elem2" class="toBeFaded tagline"><p>Angående utförandet av arton kvalitetskontroller samt rådgivning för PUB, Atrium Fastigheter. “Rulltrappskonsulterna har hjälpt mig att få fram en rättvis bild... -<em> Stefan Fransson, Teknisk förvaltare för PUB, Atrium Fastigheter AB</em></p></div> <div id="elem3" class="toBeFaded tagline"><p> Björn har under sin anställning utvecklat en gedigen kompetens inom sitt arbetsområde. Han har i sin roll visat stort engagemang för sina arbetsuppgifter.. -<em> Harry Plogbäck, Teknisk förvaltningschef - AB Storstockholms Lokaltrafik</em></p></div> <div id="elem4" class="toBeFaded tagline"><p>Behovet av kvalitetskontroller erinrar sig från värdet av en kontrollverksamhet jämtemot de som utför reparationer och service. Det skapar även möjligheten... -<em> Björn Anderson, Teknisk förvaltningschef - AB Storstockholms Lokaltrafik</em></p></div> <div id="elem5" class="toBeFaded tagline"><p>Angående utförandet av arton kvalitetskontroller samt rådgivning för PUB, Atrium Fastigheter. “Rulltrappskonsulterna har hjälpt mig att få fram en rättvis bild... -<em> Stefan Fransson, Teknisk förvaltare för PUB, Atrium Fastigheter AB</em></p></div> <div id="elem6" class="toBeFaded tagline"><p> Björn har under sin anställning utvecklat en gedigen kompetens inom sitt arbetsområde. Han har i sin roll visat stort engagemang för sina arbetsuppgifter.. -<em> Harry Plogbäck, Teknisk förvaltningschef - AB Storstockholms Lokaltrafik</em></p></div> <div id="elem7" class="toBeFaded tagline"><p>Behovet av kvalitetskontroller erinrar sig från värdet av en kontrollverksamhet jämtemot de som utför reparationer och service. Det skapar även möjligheten... -<em> Björn Anderson, Teknisk förvaltningschef - AB Storstockholms Lokaltrafik</em></p></div> <div id="elem8" class="toBeFaded tagline"><p>Angående utförandet av arton kvalitetskontroller samt rådgivning för PUB, Atrium Fastigheter. “Rulltrappskonsulterna har hjälpt mig att få fram en rättvis bild... -<em> Stefan Fransson, Teknisk förvaltare för PUB, Atrium Fastigheter AB</em></p></div> <div id="elem9" class="toBeFaded tagline"><p> Björn har under sin anställning utvecklat en gedigen kompetens inom sitt arbetsområde. Han har i sin roll visat stort engagemang för sina arbetsuppgifter.. -<em> Harry Plogbäck, Teknisk förvaltningschef - AB Storstockholms Lokaltrafik</em></p></div> <div id="elem10" class="toBeFaded tagline"><p>Behovet av kvalitetskontroller erinrar sig från värdet av en kontrollverksamhet jämtemot de som utför reparationer och service. Det skapar även möjligheten... -<em> Björn Anderson, Teknisk förvaltningschef - AB Storstockholms Lokaltrafik</em></p></div> <div id="elem11" class="toBeFaded tagline"><p>Angående utförandet av arton kvalitetskontroller samt rådgivning för PUB, Atrium Fastigheter. “Rulltrappskonsulterna har hjälpt mig att få fram en rättvis bild... -<em> Stefan Fransson, Teknisk förvaltare för PUB, Atrium Fastigheter AB</em></p></div> <img class="quote2" src="images/rightquote.png" /> <img src="images/btnLogin.png" class="btnlogin" /> </div> <div id="copyright"> <ul id="nav"> <li>LANGUAGES: </li> <li><a href="#">ENGLISH</a></li> <li><a href="#">SWEDISH</a></li> <li><a href="#">HELP</a></li> <li>COPYRIGHT BY NORDSTRÖMS HRK AB</li> </ul> </div> <div id="mac"> <div id="macscreen"> <iframe width="336" height="216" src="http://www.youtube.com/embed/AhfK9_ZlRXQ?hl=en&fs=1&rel=0&autoplay=1&autohide=1&showinfo=0&controls=0&loop=1" frameborder="0"></iframe> </div> </div> </div> </body> Just looking for some advice really, i'm sure it's something very simple! Thank you. Similar TutorialsHi I am very new to PHP. I'm wanting a feedback form on my website where the form is sent via SMTP rather than sendmail. I have checked that php is working by doing this code: Code: [Select] <?php error_reporting(E_ALL); ini_set('display_errors', True); $path = '/home/****/php'; set_include_path(get_include_path() . PATH_SEPARATOR . $path); echo("<p>Sending PEAR Mail.php...</p>"); require('Mail.php'); $from = "Info <info@***.co.uk>"; $to = "Info <info@***.co.uk>"; $subject = "Hi - Test message!"; $body = "Hi,\n\nHow are you?"; $host = "mail.***.co.uk"; $username = "info@***.co.uk"; $password = "***"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } ?> This works fine. I then created a form in my contact page: Code: [Select] <form name="feedbackform" action="form-mailer2.php" method="post"> <input type="hidden" name="Required" value="Name,Comments"> <p>Name: <input name="Name" size="30"> <span class="formsmall">required</span></p> <p>E-mail: <input name="Email" size="30"> <span class="formsmall">optional</span></p> <p>Feedback/Comments:</p> <p><textarea name="Comments" rows="5" cols="40"></textarea></p> <p><input type="submit" value="Submit" name="submitform"><input type="reset" value="Reset" name="reset"></p> </form> I then used the code based on the php initial example and the code file that would get the form details from the contact page and send to the email address via smtp. I have left the validations in - although if these are no good please feel free to tell me! I will want to put a captcha in but need to look into that yet. Anyway, the code I have created is now this (which is saved in the file form-mailer2.php): Code: [Select] <?php error_reporting(E_ALL); ini_set('display_errors', True); $path = '/home/****/php'; set_include_path(get_include_path() . PATH_SEPARATOR . $path); echo("<p>Sending PEAR Mail.php...</p>"); require('Mail.php'); $mailfrom = "info@***.co.uk"; $mailTo = "info@***.co.uk"; $mailSubject = "Web Feedback"; $mailHost = "mail.***.co.uk"; $mailPort = "25"; $mailAuth = "true"; $mailPassword = "****"; // Get the form fields. $name = $_POST['Name']; $email = $_POST['Email']; $comments = $_POST['Comments']; $reqFields = $_POST['Required']; // I find including the time/date useful for record-keeping. // Note that it is the web server's time/date, not yours // or the sender's. $date = date("l jS F Y, g:i A"); // A simple yet reasonably effective email address validator. if ((!ereg(".+\@.+\..+", $email)) || (!ereg("^[a-zA-Z0-9_@.-]+$", $email))) { $errorMessages .= "<li>Invalid email address: $email</li>"; } // Make sure required fields are filled in. $checkFields = explode(",",$reqFields); while(list($theField) = each($checkFields)) { if(!$$checkFields[$theField]) { $errorMessages .= "<li>Missing $checkFields[$theField]</li>"; } } // If there are errors, display them and a back button. if($errorMessages) { ?> <p>Errors were found on the form.</p> <ul> <?php echo $errorMessages; ?> </ul> <p><input type="button" value="Back" onClick="history.back()"></p> <?php } // No errors, send the message and print out success message. else { // Build the email. $body = " Name: $Name Email: $Email Phone: $Phone ----- Comments ----- $Comments -------------------- $headers["From"] = $mailTo; $headers["To"] = $mailTo; $headers["Subject"] = $mailSubject; $params["host"] = $mailHost; $params["port"] = $mailPort; $params["auth"] = $mailAuth; $params["username"] = $mailTo; $params["password"] = $mailPassword; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($mailTo, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } // I would rather redirect to a different thank you page but both of next options don't work when taking out: echo("<p>Message successfully sent!</p>"); //RedirectToURL("thank-you.php"); or header(Location: "thank-you.php" ); ?> Depending on what I change about I either get: The website cannot display the page or a list of undefinable variables. If anyone is able to understand the php and notice where the problem lies I would be so grateful. Thank you. I really need some help. I am very new to PHP and I've been stuck for a couple of days. I created a contact form and everything seems to be working correctly, except the mail is showing it's sent, but I never receive an email in my Inbox or Spam folder. Can someone please review my code? Here is the PHP: <?php // DEFINE VARIABLE AND SET EMPTY VALUES $varfnameErr = $varlnameErr = $varemailErr = $varphoneErr = $varpositionErr = ""; $varfname = $varlname = $varemail = $varphone = $varposition = $success = ""; //FORM SUBMITTED WITH POST METHOD if ($_SERVER["REQUEST_METHOD"] == "POST") { //VALIDATE FIRST NAME if (empty($_POST["varfname"])) { $varfnameErr = "First Name is required"; } else { $varfname = test_input($_POST["varfname"]); // MAKE SURE FIRST NAME ONLY CONTAINS LETTERS AND WHITE SPACE if (!preg_match("/^[a-zA-Z ]*$/",$varfname)) { $varfnameErr = "Only letters and white space are allowed"; } } //VALIDATE LAST NAME if (empty($_POST["varlname"])) { $varlnameErr = "Last Name is required"; } else { $varlname = test_input($_POST["varlname"]); // MAKE SURE LAST NAME ONLY CONTAINS LETTERS AND WHITE SPACE if (!preg_match("/^[a-zA-Z ]*$/",$varlname)) { $varlnameErr = "Only letters and white space are allowed"; } } //VALIDATE EMAIL ADDRESS if (empty($_POST["varemail"])) { $varemailErr = "Email Address is required"; } else { $varemail = test_input($_POST["varemail"]); // MAKE SURE EMAIL ADDRESS IS FORMATTED CORRECTLY if (!filter_var($varemail, FILTER_VALIDATE_EMAIL)) { $varemailErr = "Invalid email address format"; } } //VALIDATE PHONE NUMBER if (empty($_POST["varphone"])) { $varphoneErr = "Phone number is required"; } else { $varphone = test_input($_POST["varphone"]); // MAKE SURE PHONE NUMBER IS IN CORRECT FORMAT if (!preg_match("/^(\d[\s-]?)?[\(\[\s-]{0,2}?\d{3}[\)\]\s-]{0,2}?\d{3}[\s-]?\d{4}$/i",$varphone)) { $varphoneErr = "Invalid telephone format"; } } //VALIDATE POSITION if (empty($_POST["varposition"])) { $varpositionErr = "Position is required"; } else { $varposition = test_input($_POST["varposition"]); } //IF ALL DATA IS CORRECT if ($varfnameErr == '' and $varlnameErr == '' and $varemailErr == '' and $varphoneErr == '' and $varpositionErr == '') { $message_body = ''; unset($_POST['submit']); //THIS IS JUST FOR TESTING PURPOSES $message_body = $varfname; //foreach ($_POST as $key => $value) { // $message_body .= "$key: $value\n"; //} $to = 'mygmail@gmail.com'; $subject = 'Volunteer Form Submission'; $message = wordwrap($message_body, 70); $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; $headers .= "From: " . $varemail . "\r\n"; $subject = 'Volunteer Form Submission'; $to = 'mygmail@gmail.com'; $result = mail($to, $subject, $message, $headers); //THIS RETURNS "1" print $result; //IF ALL DATA IS CORRECT MAKE SURE EMAIL WAS SENT if (mail($to, $subject, $message, $headers)) { $success = "Message sent. Thank you contacting us! We will reply as soon as possible."; $varfname = $varlname = $varemail = $varphone = $varposition = ""; } else { $success = "Something went wrong!"; } } } //STRIP UNWANTED CHARACTERS FROM VARIABLES function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?>
Here is the HTML: <div class="row regformrow"> <div class="coffee-span-12 regformcolumn"> <div class="subgrid regformsubgrid"> <div class="row regformsubgridheaderrow"> <div class="coffee-span-12 regformsubgridheadercolumn"> <h4 class="regformsubgridheadertitle">Volunteer Form</h4> </div> </div> <div class="row regformsubgridrow"> <form class="form-container regformsubgridformcontainer" action=<?= $_SERVER['PHP_SELF']; ?> method="post"> <div class="coffee-span-4 coffee-972-span-6 coffee-458-span-12 regformsubgridcolumn1"> <div class="container regformsubgridcontainer1"> <label class="label form-label-all"><span style="font-style:italic;color:#FF5454;">* Required Fields</span></label></br> <div class="formfieldgroup"> <input class="fname" name="varfname" type="text" tabindex="1" placeholder="First Name" value="<?= $varfname; ?>"><span class="requiredfield"> *</span> <span class="form-error"><?= $varfnameErr ?></span> </div> <div class="formfieldgroup"> <input class="lname" name="varlname" type="text" tabindex="2" placeholder="Last Name" value="<?= $varlname; ?>"><span class="requiredfield"> *</span> <span class="form-error"><?= $varlnameErr ?></span> </div> <div class="formfieldgroup"> <input class="email" name="varemail" type="text" tabindex="2" placeholder="Email Address" value="<?= $varemail; ?>"><span class="requiredfield"> *</span> <span class="form-error"><?= $varemailErr ?></span> </div> <div class="formfieldgroup"> <input class="phone" name="varphone" type="text" tabindex="2" placeholder="Telephone Number" value="<?= $varphone; ?>"><span class="requiredfield"> *</span> <span class="form-error"><?= $varphoneErr ?></span> </div> <div class="formfieldgroup"> <select class="select selectbox" name="varposition" id="varposition" tabindex="5"><option value="">Select one...</option><option value="Chaperone">Chaperone</option><option value="Class Monitor">Class Monitor</option><option value="Parking Attendant">Parking Attendant</option><option value="Party Coordinator">Party Coordinator</option><option value="Teacher Aid">Teacher Aid</option></select><span class="requiredfield"> *</span> <span class="form-error"><?= $varpositionErr ?></span> </div> <div class="formfieldgroup"> <input class="test" name="test" type="text" tabindex="6" placeholder="If you are human, leave this field blank" value=""> </div> <div class="formfieldgroup"> <button type="submit" class="button-submit-1" name="submit" tabindex="7" data-submit="...Sendng">Submit</button> </div> <div class="formfieldgroup"> <div class="success"><?= $success; ?></div> </div> </div> </div> </form> </div> </div> </div> </div> Edited February 20, 2020 by mike3075 Please help: I'm trying to figure out what is going on with a custom made PHP contact form on my company's multiple websites. Check it out he www.TacticalSolar.com This custom form was made by a former employee and USUALLY works great. Validation, spam checking, database connection, etc. But I've discovered a bug. The form does not always actually send the data to us when it says it does! This problem almost always happens in Internet Explorer and Safari browsers. But sometimes that data shows up. This does not effect Firefox or Chrome. I've been looking everywhere, but no idea what is causing this. Thoughts? Ideas? I'm no PHP coder so even obvious places to look are welcome. Basically what I am needing is when a visitor comes to my site and request info on a product, the form sends the product id or name.
I have the site set up like product.php?Item=26 and the item number changes based on the product. The page items are being populated with info stored in the mysql databse.
I need the email being sent to say something like
Visitors Name has requested info on Item 26 Name - Visitors Name Email - email@me.com Phone - 123-456-7890 Company - Visitors Company Item info requested for Here is the products name URL to product page Basically the "item info" is being pulled from the database. I have asked on different forums and I cannot get a good answer that I can use to make this happen. I might not be explaining it right. Page the form is on is (and all other new-product.php pages) http://www.packagingequipment4sale.com/new-product.php?Item=26Any help would be greatly appreciated I've been ALL over the internet trying to find complete step by step guides on getting php to work for my contact form and I can't find anything. Or at least nothing that makes sense to me. I know nothing about PHP, I'm more of a designer/html/css person. PHP is completely foreign to me and very hard to understand. I have downloaded PHPMailer but I have no idea what I'm supposed to do with it or how to really configure it. I really need help in that area. This contact form is the last thing I need before I can put my redesign of my website up.
Hi, i have a script problem as I am a graphic designer with zero php knowledge. I have a contact script that sends emails but they are blank. Meaning all text fields are not sending. If you could correct this for me thanks in advance. Here is my hacked up script that sends email with empty fields: Hi the user fill details and then the email his sent to me the only problem is that the emails keeps going to my spam, can someone help me out please I looked already php website and email format looks the same. This is the link to my form. http://www.people.eurico.co.uk/ here my form script Code: [Select] <?php // Set email variables $email_to = 'xxxxx@xxxxxxx.co.uk'; $email_subject = 'Call back form'; // Set required fields $required_fields = array('fullname','email','telephone','comment'); // set error messages $error_messages = array( 'fullname' => 'Please enter a Name to proceed.', 'email' => 'Please enter a valid Email.', 'telephone' => 'Please telephone.', 'comment' => 'Please enter your Message to continue.' ); // Set form status $form_complete = FALSE; // configure validation array $validation = array(); // check form submittal if(!empty($_POST)) { // Sanitise POST array foreach($_POST as $key => $value) $_POST[$key] = remove_email_injection(trim($value)); // Loop into required fields and make sure they match our needs foreach($required_fields as $field) { // the field has been submitted? if(!array_key_exists($field, $_POST)) array_push($validation, $field); // check there is information in the field? if($_POST[$field] == '') array_push($validation, $field); // validate the email address supplied if($field == 'email') if(!validate_email_address($_POST[$field])) array_push($validation, $field); } // basic validation result if(count($validation) == 0) { // Prepare our content string $email_content = 'peoplesmartlearning.co.uk: ' . "\n\n"; // simple email content foreach($_POST as $key => $value) { if($key != 'submit') $email_content .= $key . ': ' . $value . "\n"; } // if validation passed ok then send the email mail($email_to, $email_subject, $email_content); // Update form switch $form_complete = TRUE; } } function validate_email_address($email = FALSE) { return (preg_match('/^[^@\s]+@([-a-z0-9]+\.)+[a-z]{2,}$/i', $email))? TRUE : FALSE; } function remove_email_injection($field = FALSE) { return (str_ireplace(array("\r", "\n", "%0a", "%0d", "Content-Type:", "bcc:","to:","cc:"), '', $field)); } ?> The HTML Code: [Select] <div class="call_us_form"> <p class="title">WE'LL CALL YOU BACK</p> <?php if($form_complete === FALSE): ?> <form class="contact_form" id="fm-form" method="post" action="index.php" > <fieldset> <div class="fm-req"> <label for="fm-firstname">Name</label> <input type="text" id="fullname" class="detail" name="fullname" value="<?php echo isset($_POST['fullname'])? $_POST['fullname'] : ''; ?>" /> <?php if(in_array('fullname', $validation)): ?><script type="text/javascript">alert("Please enter a Name"); history.back();</script><?php endif; ?> </div> <div class="fm-req"> <label for="fm-firstname">Email</label> <input type="text" id="email" class="detail" name="email" value=" <?php echo isset($_POST['email'])? $_POST['email'] : ''; ?>" /> <?php if(in_array('email', $validation)): ?><script type="text/javascript">alert("Please enter a valid Email Address"); history.back();</script><?php endif; ?> </div> <div class="fm-req"> <label for="fm-firstname">Number</label> <input type="text" id="telephone" class="detail" name="telephone" value="<?php echo isset($_POST['telephone'])? $_POST['telephone'] : ''; ?>" /> <?php if(in_array('telephone', $validation)): ?><script type="text/javascript">alert("Please enter telephone number"); history.back();</script><?php endif; ?> </div> <div class="fm-req"> <label for="fm-lastname">Message</label> <textarea cols="40" rows="5" id="comment" name="comment" class="mess"><?php echo isset($_POST['comment'])? $_POST['comment'] : ''; ?></textarea> <?php if(in_array('comment', $validation)): ?><script type="text/javascript">alert("Please enter your message"); history.back();</script><?php endif; ?> </div> <input class="submit_button" type="submit" value="Call us" /> </fieldset> </form> <?php else: ?> <p>Thank you for your Message!</p> <p>We will get back to you as soon as we can</p> <script type="text/javascript"> setTimeout ('ourRedirect()', 5000) function ourRedirect () { location.href='index.php' } </script> <?php endif; ?> Hi, I have a contact for which I wish to send to multiple recipients as a BCC, but I cannot work it out. I can add them as recipients, but they are not hidden in the email. This is what I have: if(isset($_POST['submit'])){ $name=$_POST['name']; $year=$_POST['year']; $email=$_POST['email']; $subject = 'Hello Admin !'; $message="Name : $name <br> Email : $email <br> Phone : $phone <br> Year : $year"; $recipients ="me@me.com, me2@me2.com"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $subject="New contact details"; $headers .= 'From: TEST<test@test.com>' . "\r\n"; mail($recipients ,$subject,$message,$headers); header("Location: thankyou.php"); Any ideas what I should do? Thanks Hi everyone.
Pretty desperate, first time that I'm working with php. Learning this language, makes sense, however I can't figure out why my code is not working.
Emails are not coming in at all. Additional required info (phone number, first name, last name) should be included in the message.
Please help. Thank you everyone.
<?php $to = "abcd@abcd.com"; $subject = "From Website Contact Form"; $first = $_REQUEST['first']; $last = $_REQUEST['last']; $email = $_REQUEST['email']; $phone = $_REQUEST['phone']; $MESSAGE_BODY = "Name: " . $_POST["first"] . "\n"; $MESSAGE_BODY = "Name: " . $_POST["last"] . "\n"; $MESSAGE_BODY = "Contact No: " . $_POST["phone"] . "\n"; $MESSAGE_BODY = "Email: " . $_POST["email"] . "\n"; $MESSAGE_BODY = "Requirement: " . nl2br($_POST["message"]) . "\n"; $message = $_REQUEST['message' + 'email' + 'first' + 'last']; $from = $_REQUEST['email']; $headers = "From:" . $from; mail($to, $subject, $MESSAGE_BODY, $headers); echo "Your message has been sent"; ?> I am trying to add my email to a contact form to where a customer would fill in a few boxes and hit send and i would receive. Where would i find the code to enter it? thanks, w Hi, I had a website running a few months ago with a working contact form I am now building a new website and have copied the files changing relevant info but it is not not working it is sending me to the thank you page but the email is not coming through. Can anybody see why? <?php $EmailTo = "MYEMAIL@gmail.com"; $Subject = "Contact from Website"; $Title = Trim(stripslashes($_POST['Title'])); $FName = Trim(stripslashes($_POST['First Name'])); $LName = Trim(stripslashes($_POST['Last Name'])); $Email = Trim(stripslashes($_POST['Email'])); // prepare email body text $Body = ""; $Body .= "Title: "; $Body .= $Title; $Body .= "\n"; $Body .= "First Name: "; $Body .= $FName; $Body .= "\n"; $Body .= "Last Name: "; $Body .= $LName; $Body .= "\n"; $Body .= "Email: "; $Body .= $Email; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$Email>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=thankyou.php\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.php\">"; } ?> Code: [Select] <form action="quoteform.php" method="post" enctype="multipart/form-data" name="quoteform" id="quoteform"> <label for="Title" id="Title">Title:</label><select name="Title"> <option value="Mr">Mr</option> <option value="Mrs">Mrs</option> <option value="Miss">Miss</option> <option value="Ms">Ms</option> <option value="Dr">Dr</option> <option value="Other">Other</option> </select> <label for="FName" id="FName">First Name:</label><input name="First Name" type="text" size="25"> <label for="LName" id="LName">Last Name:</label><input name="Last Name" type="text" size="25"> <label for="Email" id="Email">Email:</label><input name="Email" type="text" size="50"> <input type="submit" name="submit" value="Send" class="submit-button" title="Submit" /> <input type="button" value="Clear Message" onClick="document.forms['quoteform'].Message.value=''" /> </form> Hello all, I am having a bit of trouble with this contact form. Everything submits fine, errors work and all but the information isn't sent to my inbox. Can anyone point out where the problem is? Thanks in advance! Code: [Select] if(isset($_POST['Email_Address'])) { include 'free_settings.php'; function died($error) { echo "Sorry, but there were error(s) found with the form you submitted. "; echo "These errors appear below.<br /><br />"; echo $error."<br /><br />"; echo "Please go back and fix these errors.<br /><br />"; die(); } if(!isset($_POST['Full_Name']) || !isset($_POST['Email_Address']) || !isset($_POST['Your_Message'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $full_name = $_POST['Full_Name']; // required $email_from = $_POST['Email_Address']; // required $comments = $_POST['Your_Message']; // required $error_message = ""; $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; if(preg_match($email_exp,$email_from)==0) { $error_message .= 'The Email Address you entered does not appear to be valid.<br />'; } if(strlen($full_name) < 2) { $error_message .= 'Your Name does not appear to be valid.<br />'; } if(strlen($comments) < 2) { $error_message .= 'The Comments you entered do not appear to be valid.<br />'; } if(strlen($error_message) > 0) { died($error_message); } $email_message = "Form details below.\r\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "Full Name: ".clean_string($full_name)."\r\n"; $email_message .= "Email: ".clean_string($email_from)."\r\n"; $email_message .= "Message: ".clean_string($comments)."\r\n"; $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); header("Location: $thankyou"); ?> <script>location.replace('<?php echo $thankyou;?>')</script> <?php I'm having a problem getting my contact form information to arrive in the desired email account. The email account itself if provided by my web host. It has the ability to send and receive emails. The validation works perfectly eg when i type in incorrect/ miss out information it displays the appropriate error message. When i put in the proper information it displays the "Thank you for contacting us. We will be in touch with you very soon" message but not email arrives in the specified email account. Could someone please check over my code and see if there is something that I am missing? Below are the html form and php codes. Code: [Select] <form action="send_form_email.php" method="post" > <table width="400" border="0"> <tr> <td width="150" valign="top"> <label for="first_name">*First Name:-</label> </td> <td valign="top" align="right"> <input type="text" name="first_name" maxlength="50" size="37"> </td> </tr> <tr> <td width="150" valign="top"> <label for="last_name">*Last Name:-</label> </td> <td valign="top" align="right"> <input type="text" name="last_name" maxlength="50" size="37"> </td> </tr> <tr> <td width="150" valign="top"> <label for="email">*Email Address:-</label> </td> <td valign="top" align="right"> <input type="text" name="email" maxlength="50" size="37"> </td> </tr> <tr> <td width="150" valign="top"> <label for="phone">Telephone Number:-</label> </td> <td valign="top" align="right"> <input type="text" name="phone" maxlength="50" size="37"> </td> </tr> <tr> <td width="150" valign="top"> <label for="contact">Contact Time:-</label> </td> <td valign="top" align="right"> <select name="contact"> <option value="Anytime from 9am - 9pm!">Anytime from 9am - 9pm!</option> <option value="9am - 1pm">9am - 1pm</option> <option value="1pm - 2pm">1pm - 2pm</option> <option value="2pm - 6pm">2pm - 6pm</option> <option value="6pm - 9pm">6pm - 6pm</option> <option value="Please do not contact me by phone!">Please do not contact me by phone!</option> <option value="">_________________________________</option> </select> </td> </tr> <tr> <td width="150" valign="top"> <label for="find">How did you hear about MPM?</label> </td> <td valign="top" align="right"> <select name="find"> <option value="Search Engine">Search Engine</option> <option value="Facebook Ad">Facebook Ad</option> <option value="Facebook Profile">Facebook Profile</option> <option value="Gumtree Ad">Gumtree Ad</option> <option value="Recommendation">Recommendation</option> <option value="">_________________________________</option> </select> </td> </tr> <tr> <td colspan="2" valign="top"> <br> </td> </tr> <tr> <td colspan="2" valign="top"> <label for="comments">*Enquiry:-</label> </td> </tr> <tr> <td colspan="2" valign="top"> <center> <textarea name="comments" maxlength="1000" cols="47" rows="10"></textarea> </center> </td> </tr> <tr> <td colspan="2" valign="top"> <br> </td> </tr> <tr> <td colspan="2" align="center" valign="top"> * = Required Field </td> </tr> <tr> <td colspan="2" align="center" valign="top"> <input type="submit" value=" Send your enquiry! " /> </td> </tr> </table> </form> Code: [Select] <?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "mrpaul@mrpaulmedia.co.uk"; $email_subject = "New customer information:"; function died($error) { // your error code can go here echo "We are very sorry, but there were error(s) found with the form you submitted. "; echo "These errors appear below.<br /><br />"; echo $error."<br /><br />"; echo "Please go back and fix these errors.<br /><br />"; die(); } // validation expected data exists if(!isset($_POST['first_name']) || !isset($_POST['last_name']) || !isset($_POST['email']) || !isset($_POST['phone']) || !isset($_POST['contact']) || !isset($_POST['find']) || !isset($_POST['comments'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $first_name = $_POST['first_name']; // required $last_name = $_POST['last_name']; // required $email_from = $_POST['email']; // required $telephone = $_POST['phone']; // not required $contact = $_POST['contact']; // not required $find = $_POST['find']; // not required $comments = $_POST['comments']; // required $error_message = ""; $email_exp = "^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$"; if(!eregi($email_exp,$email_from)) { $error_message .= 'The Email Address you entered does not appear to be valid.<br />'; } $string_exp = "^[a-z .'-]+$"; if(!eregi($string_exp,$first_name)) { $error_message .= 'The First Name you entered does not appear to be valid.<br />'; } if(!eregi($string_exp,$last_name)) { $error_message .= 'The Last Name you entered does not appear to be valid.<br />'; } if(strlen($comments) < 2) { $error_message .= 'The Comments you entered do not appear to be valid.<br />'; } if(strlen($error_message) > 0) { died($error_message); } $email_message = "New customer details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "First Name: ".clean_string($first_name)."\n"; $email_message .= "Last Name: ".clean_string($last_name)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n"; $email_message .= "Telephone: ".clean_string($telephone)."\n"; $email_message .= "Preferred Time of Contact: ".clean_string($contact)."\n"; $email_message .= "How did the customer find out about Mr Paul Media?: ".clean_string($find)."\n"; $email_message .= "Comments: ".clean_string($comments)."\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <!-- include your own success html here --> Thank you for contacting us. We will be in touch with you very soon. <?php } ?> I'd be very grateful for any help! Hi, am having abit of a problem.Can anyone help me in programming my form to send it's details to an email address.The form should be able to detect unfilled fields,unselected items all in all the form should work as a effectively according to how i designed it The email sending processing should be handled by a separate file known as process.php below is the HTML coding... <form name="myform" action="process.php" method="POST"> Name: <input type="text" name="Name" /><br /> Email: <input type="text" name="Email" /><br /> Select something from the list: <select name="Seasons"> <option value="Spring" selected="selected">Spring</option> <option value="Summer">Summer</option> <option value="Autumn">Autumn</option> <option value="Winter">Winter</option> </select><br /><br /> Choose one: <input type="radio" name="Country" value="USA" /> USA <input type="radio" name="Country" value="Canada" /> Canada <input type="radio" name="Country" value="Other" /> Other <br /> Choose the colors: <input type="checkbox" name="Colors[]" value="green" checked="checked" /> Green <input type="checkbox" name="Colors[]" value="yellow" /> Yellow <input type="checkbox" name="Colors[]" value="red" /> Red <input type="checkbox" name="Colors[]" value="gray" /> Gray <br /><br /> Comments:<br /> <textarea name="Comments" rows="10" cols="60">Enter your comments here</textarea><br /> <input type="submit" /> </form> Okay, below is my mailer for a contact form i created. On one site it works fine. I even have it sending to several addresses from the othersite. However this site it doesnt want to work. PHP5 and mail() function is active. <?php $Name = Trim(stripslashes($_POST['fullname'])); $EmailFrom = Trim(stripslashes($_POST['email'])); $EmailTo = "james@jd-creations.co.uk"; $Subject = Trim(stripslashes($_POST['subject'])); $answer = Trim(stripslashes($_POST['answer'])); $Comments = Trim(stripslashes($_POST['message'])); $Subject = "The Reason - Contact Us"; // validation $validationOK=true; if (Trim($EmailFrom)=="") $validationOK=false; if (Trim($answer)!=="20") $validationOK=false; if (Trim($Name)=="") $validationOK=false; if (Trim($Comments)=="") $validationOK=false; if (Trim($Subject)=="") $validationOK=false; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=../contact/error2.php\">"; exit; } // prepare email body text $Body = ""; $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "Email: "; $Body .= $EmailFrom; $Body .= "\n"; $Body .= "Comments: "; $Body .= $Comments; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=../contact/sent.php\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=../contact/error.php\">"; } ?> now i know it is wroking because it takes me to the sent.php page. not error.php i think it worked once. now not at all. EDIT, CORRECTION- IT WENT TO MY JUNKMAIL. HOW DO I PREVENT THAT? ALSO, IT DID NOT PUT THE USER'S IP IN THE 'POSTER' FIELD IN DB SO I CAN PREVENT MULTIPLE POSTS PER PERSON. Hi, I went over the code and looks good to me, I put the "poster" field in my Members table. Everything looks good, my page loads with no errors, but the email never gets sent upon submitting the form "user poll" here is the relevant code, please any help greatly appreciated! thank you. Code: [Select] <?php if($_POST['submit']) { $currentPoster = $_SERVER['REMOTE_ADDR']; // get ip of visitor $query = mysql_query("SELECT * FROM members WHERE poster = '$currentPoster'"); //check DB for user ip if (mysql_num_rows($query) > 0) //if ip exists, user already posted { $error=1; //this is t o set if error message echoes or not. $errorMessage=" You already posted to this poll"; // echo error to the multiple post prick//echoed out below } else { $query2 = mysql_query("INSERT INTO members(poster) VALUES ('$currentPoster')");// insert new ip into DB $email_from = '.info POLL'; // email information $email_subject = " POLL RESPONDER"; $email_body = "You have received a new poll message from the user ip address of $currentPoster.\n". "Here is the message:\n $userfeedback"; //////////////////////////////////////////////////////////////////////// //SEND THE EMAIL $to = "xxxx@hotmail.com"; //email headers $headers = "From: $email_from \r\n"; $headers .= "Reply-To: no one \r\n"; mail($to,$email_subject,$email_body,$headers);// sends off the final email. $error=0; $goodmessage="Thank you for your feedback!"; } } ?> <form id="userfeedback" method="post" action="index.php"> <p> <textarea name="userfeedback" id="userfeedback" cols="45" rows="5"></textarea> <input type="submit" id="submit" name="submit"/> <input type="reset" id="reset" name="reset"/> </p> </form> <br/> <?php if($error=1) { echo $errorMessage; }else { echo $goodmessage; } ?> Hello Everyone, Currently our form is not sending confirmation emails. We can see the quote requests in our content management system however are sales team is not getting the email requesting the quote. There is no option in our content management system to click this on or off so I am assuming something is not right in the code. form-process.php Code: [Select] <? session_start(); include('settings.php'); include('classes/class.formdata.php'); include('classes/class.email.php'); include('classes/class.DB.php'); include('functions/functions.general.php'); if ($_POST["PreviousOrderNumber"]){$_POST["Layout*"]=$_POST["PreviousOrderNumber"];} unset($_POST["PreviousOrderNumber"]); $newformdata = new FormData($_POST); //echo "Hello"; switch ($send_form_data) { case 'email': { if (!$_SESSION['formerrors']) { $newemail = new Email($to,$from, $subject); $newemail->SendEmail(); var_dump($_SESSION["formdata"]); unset($_SESSION["formdata"]); $redirect = $newformdata->referrer; header("Location: $redirect"); } } break; case 'email/db': { if (!$_SESSION['formerrors']) { $newemail = new Email($to,$from, $subject); $newemail->SendEmail(); $dbFormData = new DB(); $dbFormData->writePostToDB($_SESSION["formdata"],"QuoteRequests"); if (count($_FILES)>1){ $dbFormData->writeFilesToDB($_FILES,"QuoteRequests"); } unset($_SESSION["formdata"]); } } break; default: { echo 'Invalid setting in variable $send_form_data'; } break ; } //echo "END"; //exit; $redirect = $newformdata->referrer; header("Location: $redirect"); exit; $newformdata = new FormData($_POST); //var_dump($_SESSION['formerrors']) . " - " .var_dump($_SESSION["formdata"]);exit; switch ($send_form_data) { case 'email': { if (!$_SESSION['formerrors']) { $newemail = new Email($to,$from, $subject); $newemail->SendEmail(); unset($_SESSION["formdata"]); } } break ; default: { echo 'Invalid setting in variable $send_form_data'; } break ; } //insert into db if (!$_SESSION['formerrors']) { $arg = ''; $FirstName= $_POST['FirstName*']; $LastName= $_POST['LastName*']; $Company= $_POST['Company']; $Phone= $_POST['Phone*']; $Fax= $_POST['Fax']; $Email= $_POST['Email*']; $PONumber= $_POST['PONumber']; $Address= $_POST['Address*']; $ApartmentOrUnitNumber= $_POST['ApartmentOrUnitNumber']; $City= $_POST['City*']; $State= $_POST['State*']; $Zip= $_POST['Zip*']; $Quantity= $_POST['Quantity*']; $Height= $_POST['Height*']; $Width= $_POST['Width*']; $Characters= $_POST['Characters*']; $AdditionalCharacters= $_POST['AdditionalCharacters']; $Metal= $_POST['Metal*']; $Border= $_POST['Border*']; $Texture= $_POST['Texture*']; $Color= $_POST['Color*']; $Finish= $_POST['Finish*']; $Mounting= $_POST['Mounting*']; $Font= $_POST['Font*']; $Capitalization= $_POST['Capitalization*']; $Proof= $_POST['Proof*']; $Layout= $_POST['Layout*']; $Logo= $_POST['Logo']; $SpecialInstructions= $_POST['SpecialInstructions']; //echo "Done"; exit; $arg = "INSERT INTO `healypla_general`.`QuoteRequests` (`Quote_Id`, `FirstName`, `LastName`, `Company`, `Phone`, `Fax`, `Email`, `PONumber`, `Address`, `ApartmentOrUnitNumber`, `City`, `State`, `Zip`, `Quantity`, `Height`, `Width`, `Characters`, `AdditionalCharacters`, `Metal`, `Border`, `Texture`, `Color`, `Finish`, `Mounting`, `Font`, `Capitalization`, `Proof`, `Layout`, `Logo`, `SpecialInstructions`, `DateSubmitted`) VALUES (NULL, '$FirstName ', '$LastName', '$Company', '$Phone', '$Fax', '$Email', '$PONumber', '$Address', '$ApartmentOrUnitNumber', '$City', '$State', '$Zip', '$Quantity', '$Height', '$Width', '$Characters', '$AdditionalCharacters', '$Metal', '$Border', '$Texture', '$Color', '$Finish', '$Mounting', '$Font', '$Capitalization', '$Proof', '$Layout', '$Logo', '$SpecialInstructions', CURRENT_TIMESTAMP);"; $newdb = new DB($dbhost, $dbuser, $dbpass, $dbname); $arg = $arg; $result1 = $newdb->insert_db($arg); } $redirect = $newformdata->referrer; if ($_SESSION['formerrors']) { header("Location: $redirect"); } else { echo "Done";} exit; ?> $FirstName= $_POST['FirstName*']; $LastName= $_POST['LastName*']; $Company= $_POST['Company']; $Phone= $_POST['Phone*']; $Fax= $_POST['Fax']; $Email= $_POST['Email*']; $PONumber= $_POST['PONumber']; $Address= $_POST['Address*']; $City= $_POST['City*']; $State= $_POST['State*']; $Zip= $_POST['Zip*']; $Quantity= $_POST['Quantity*']; $Height= $_POST['Height*']; $Width= $_POST['Width*']; $Characters= $_POST['Characters*']; $AdditionalCharacters= $_POST['AdditionalCharacters']; $Metal= $_POST['Metal*']; $Border= $_POST['Border*']; $Texture= $_POST['Texture*']; $Color= $_POST['Color*']; $Finish= $_POST['Finish*']; $Mounting= $_POST['Mounting*']; $Font= $_POST['Font*']; $Capitalization= $_POST['Capitalization*']; $Proof= $_POST['Proof*']; $Layout= $_POST['Layout*']; $Logo= $_POST['Logo']; $SpecialInstructions= $_POST['SpecialInstructions']; then settings.php Code: [Select] <? //Global settings //Handles what to do with form data after it has been validated //email or database $send_form_data = 'email/db'; //Email settings //Where to send email $to = 'sales@healyplaques.com'; //Where it came from $from = 'quote'; //Subject of email $subject = 'Custom Plaque Quote - '; //Database settings ?> Any help would be extremely appreciated! Thanks, Amanda Smith the form results are being sent to the selected email address in the array ... but I need a copy sent to the admin email address as well. before adding the array addresses ... the forms results were being sent to the admin, but after adding the array ... the admin address is out of the loop. How do I get the admin@home.com address to receive a copy of the forms results? I'm not sure if it needs to be a Bcc or what? Thanks in advance. _________________________________________________ _______________________________________ $to = $_POST["to"]; if(!in_array($to,array("ian@elsewhere.com","adam@elsewhere.com","keith@elsewhere.com","sue@elsewhere.com","mark@elsewhere.com","scott@elsewhere.com","joyce@elsewhere.com","joe@elsewhere.com","ken@elsewhere.com","info@elsewhere.com"))) $to = "admin@home.com"; $subject = "Order"; Hello, I am very very new to PHP and have created a form that changes depending on a selection option. The website is here http://www.rmdesignstudio.com.au/wraptinprint/quotes.php and the PHP is all on the quotes.php page. The form sends to the email but when you fill in one form (example: Business Cards) the form sends, but along with all the entered fields the email also includes all the fields in all the hidden forms that werent filled in. I believe it is because they are drop down boxes and it is sending the first option in the list which happens to be "-----Please Select-----" Is there something I should be doing to my selection input field for this not to show up? Otherwise is there something I need to add to my PHP so it checks for the fields being filled in? I dont know how to add my code to this post, so if you could either show me or view my code via view source that would be awesome. I have a one-page responsive website template with a built-in contact email form whereby I would like to add an upload file attachment provision to the contact form. While I have been able to successfully add two fields (source, URL) to the built-in contact email form, with exception of adding the HTML to the form , modification to the contact email form's PHP files appears to be much more involved whereby I have been unable to find a barebones PHP code I can add to the existing PHP to make this work. I should also add that while I am well versed in HTML, CSS, and Javascript, I am not when it comes to PHP. In brief, I prefer not to replace the built-in contact form with different HTML and PHP for adding a contact form email file attachment. Any suggestions regarding this subject matter are appreciated. Since PHP is not listed under accepted file types for attachment to this post, I can provide download links to the contact email form PHP files from my iHost server for review if need be. The website address to view the HTML source code for the built-in contact form is https://www.seoauditspecialists.com. Apart from my having to add 'enctype=”multipart/form-data”' to the contact form's <form action> line of code, the HTML to add the 'file' field is provided below. Thank you ahead of time.
<div class="form-group"> |