Note that there are some explanatory texts on larger screens.

plurals
  1. POMail issues with PHP, Unable to send
    text
    copied!<p>I am currently using a feed back form on my site and I am trying to get that feedback form to send to my email but keep getting notices maybe someone can send me the right way to write it thanks so much here is all my code and the errors..</p> <p>FORM</p> <pre><code> &lt;script type="text/javascript"&gt; function MM_validateForm() { //v4.0 if (document.getElementById){ var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i&lt;(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p&lt;1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num&lt;min || max&lt;num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } } &lt;/script&gt; &lt;div id="services"&gt; &lt;h3&gt;&lt;a href="services.php"&gt;Services&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;What we can do&lt;/p&gt; &lt;ul&gt; &lt;li&gt;item&lt;/li&gt; &lt;li&gt;item&lt;/li&gt; &lt;li&gt;item&lt;/li&gt; &lt;li&gt;item&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div id="portfolio"&gt; &lt;h3&gt;&lt;a href="portfolio.php"&gt;Portfolio&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Some of our work&lt;/p&gt; &lt;/div&gt; &lt;div id="hireus"&gt; &lt;h3&gt;&lt;a href="services.php"&gt;Request more info below!&lt;/a&gt;&lt;/h3&gt; &lt;form action="processor.php" method="post" name="myform" id="myform" onsubmit="MM_validateForm('fname','','R','lname','','R','email','','RisEmail','phone','','NisNum');return document.MM_returnValue"&gt; &lt;label for="fname"&gt;First name&lt;/label&gt; &lt;input name="fname" type="text" id="fname" /&gt; &lt;label for="lname"&gt;Last name&lt;/label&gt; &lt;input name="lname" type="text" id="lname" /&gt; &lt;label for="email"&gt;Email Address&lt;/label&gt; &lt;input name="email" type="text" id="email" /&gt; &lt;label for="phone"&gt;Phone Number&lt;/label&gt; &lt;input name="phone" type="text" id="phone" placeholder="800.867.5309" /&gt; &lt;fieldset class="checkgroup"&gt; &lt;legend&gt;Services Interested In:&lt;/legend&gt; &lt;input name="services" type="checkbox" value="services_web" id="services_web" /&gt; &lt;label for="services_web"&gt;Web Design&lt;/label&gt; &lt;input name="services" type="checkbox" value="services_design" id="services_design" /&gt; &lt;label for="services_web"&gt;Video &amp; 3D&lt;/label&gt; &lt;input name="services" type="checkbox" value="services_consultation" id="services_consultation" /&gt; &lt;label for="services_web"&gt;Consulation&lt;/label&gt; &lt;/fieldset&gt; &lt;textarea name="comments" id="comments" cols="35" rows="3"&gt;&lt;/textarea&gt; &lt;input name="submit" type="submit" value="Submit Info" /&gt; &lt;/form&gt; &lt;/div&gt; PROCESSOR &lt;?php /************************ </code></pre> <p>*PHP Form Processor * <strong><em>*</em>**<em>*</em>**<em>*</em>**<em>*</em>***</strong>/</p> <pre><code>//Trim removes white space after strip_tags gets rid of any html, javascript, etc tags from the input $fname = trim(strip_tags($_POST['fname'])); $lname = trim(strip_tags($_POST['lname'])); $email = trim(strip_tags($_POST['email'])); $phone = trim(strip_tags($_POST['phone'])); $services = trim(strip_tags($_POST['services'])); $comments = trim(strip_tags($_POST['comments'])); //Creating a single variable to format and hold all the inputs $body = " Website Contact Form First Name: $fname Last Name: $lname Email Address: $email Phone: $phone Services Interested In: $services Comments: $comments"; mail ("spencer.schell87@gmail.com","Widget Box Contact Form","$body","$email"); mail ("$email","Widget Box Contact Form","$body","spencer.schell87@gmail.com"); ?&gt; &lt;!DOCTYPE HTML&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;link rel="stylesheet" type="text/css" href="css/reset.css" /&gt; &lt;link rel="stylesheet" type="text/css" href="css/formatBlog.css" /&gt; &lt;title&gt;Schell Shock Design's Portfolio&lt;/title&gt; &lt;/head&gt; &lt;body class="tos"&gt; &lt;div id="login"&gt; &lt;?php include('login.php'); ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="utilities"&gt; &lt;?php include('utilities.php'); ?&gt; &lt;/div&gt; &lt;div id="container"&gt; &lt;header&gt; &lt;?php include('header.php'); ?&gt; &lt;/header&gt; &lt;div id="formsuccess"&gt; &lt;h3&gt;Thank You!&lt;/h3&gt; &lt;?php //if the email was sent, show the success message echo '&lt;div class="success"&gt;Thanks '.$fname.'. Your message was sent.&lt;/div&gt;'; echo '&lt;div class="success"&gt;A copy of your form results were also mailed to '.$email.'.&lt;/div&gt;'; echo '&lt;div class="success"&gt;We will get back to you at: '.$email.' or at: '.$phone.' within 24 hours.&lt;/div&gt;'; ?&gt; &lt;/div&gt; &lt;div id="footer"&gt; &lt;?php include('footer.php'); ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>My Warnings:</p> <pre><code>Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\schellshockdesign.com\term5final\finalproject\processor.php on line 24 Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\schellshockdesign.com\term5final\finalproject\processor.php on line 25 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload