Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP MESSAGE Issue
    primarykey
    data
    text
    <p><em>SOLVED</em></p> <h2>The freaking error was having "inc" in the from address. CHANGED <code>$from = "messageform@courtesycareinc.com";</code> to <code>$from = "messageform@courtesycare.com";</code> and it worked.</h2> <p>I can't get this working. On another site I had, I used a similar method, but with a database and it works. When I use it this way without a database, for some reason it won't work. I can't get a message to send out.</p> <pre><code>&lt;?php if (isset($_POST['send'])) { $name = $_REQUEST['name']; $email = $_REQUEST['email']; $phone = $_REQUEST['phone']; $subject = $_REQUEST['subject']; $message = $_REQUEST['message']; $semail = "yanikem@gmail.com"; $name = htmlspecialchars($name, ENT_QUOTES); $email = htmlspecialchars($email, ENT_QUOTES); $phone = htmlspecialchars($phone, ENT_QUOTES); $subject = htmlspecialchars($subject, ENT_QUOTES); $message = htmlspecialchars($message, ENT_QUOTES); $from = "messageform@courtesycareinc.com"; $headers = "From: $from"; $message .= "Courtesy Care, Inc. Contact\n\n"; $message .= "The following information was collected from Courtesy Care, Inc.'s Contact Form.\n\n"; $message .= "&lt;table&gt;&lt;tr&gt;&lt;td&gt;Name:&amp;nbsp;&lt;/td&gt;&lt;td&gt;".$name."&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Email:&amp;nbsp;&lt;/td&gt;&lt;td&gt;".$email."&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Phone:&amp;nbsp;&lt;/td&gt;&lt;td&gt;".$phone."&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Subject:&amp;nbsp;&lt;/td&gt;&lt;td&gt;".$subject."&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Message:&amp;nbsp;&lt;/td&gt;&lt;td&gt;".$message."&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"; mail($semail, "Courtesy Care, Inc.", $message, $headers); header ('Location: contactusdone.php?say=msent'); } ?&gt; &lt;form action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;" method="post"&gt; &lt;table style="text-align:left; width: 500px; left:45px; position:relative; padding:2px; border:1px solid #1A1A1A"&gt; &lt;tr&gt; &lt;td colspan="2" style="vertical-align:top; text-align:center; border:1px solid #1A1A1A; background-color:#A52A2A; color:#FFFFFF;"&gt;MESSAGE FORM&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2"&gt;&lt;center&gt;The form below can be used to send a detailed message to &lt;strong&gt;courtesycare@comcast.net&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/center&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width="80" align="right" valign="top"&gt;Name:&amp;nbsp;&lt;/td&gt; &lt;td width="302" align="left" valign="top"&gt;&lt;input name="name" type="text" style="width:98%" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="right" valign="top"&gt;Email:&amp;nbsp;&lt;/td&gt; &lt;td align="left" valign="top"&gt;&lt;input name="email" type="text" style="width:98%" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="right" valign="top"&gt;Phone:&amp;nbsp;&lt;/td&gt; &lt;td align="left" valign="top"&gt;&lt;input name="phone" type="text" style="width:98%" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="right" valign="top"&gt;Subject:&amp;nbsp;&lt;/td&gt; &lt;td align="left" valign="top"&gt;&lt;input name="subject" type="text" style="width:98%" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="right" valign="top"&gt;Message:&amp;nbsp;&lt;/td&gt; &lt;td align="left" valign="top"&gt;&lt;textarea name="message" style="width:98%; height:150px;"&gt;&lt;/textarea&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2" align="right"&gt;&lt;input type="reset" value="Clear Fields"&gt; &lt;input type="submit" name="send" value="Send" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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