Skip to main content
Inspiring
January 19, 2010
Question

Need HELP fast with contact & Mailing List forms PLEASE!

  • January 19, 2010
  • 1 reply
  • 874 views

Ok, this is the code I have for my contact form, I'm also attaching my contact.php file, if someone could take a look at this and let me know what's going wrong I'd greatly appreciate it!  I uploaded the site (http://www.sdesignsstore.com) and I tried out the form on the contact page and I got emailed this error...

The following error occurred in FormMail :

no_valid_recipients

**********

Error=The form has an internal error - no valid recipients were specified.

email:

realname:

Here's the code for the form on the contact page...

<form id="form1" name="contact" method="post" action="contact.php">

    <table width="300">

      <tr>

        <td colspan="2"><span class="MainText">All information will be kept private</span></td>

      </tr>

      <tr>

        <td width="61"><span class="MainText">Name:</span></td>

        <td width="227"><span class="MainText">

          <input name="Name" type="text" id="Name" size="25" />

        </span></td>

      </tr>

      <tr>

        <td><span class="MainText">Email:</span></td>

        <td><span class="MainText">

          <input name="Email" type="text" id="Email" size="25" />

        </span></td>

      </tr>

      <tr>

        <td><span class="MainText">Phone:</span></td>

        <td><span class="MainText">

          <input name="Phone" type="text" id="Phone" size="25" />

        </span></td>

      </tr>

      <tr>

        <td> </td>

        <td> </td>

      </tr>

      <tr>

        <td><span class="MainText">Message:</span></td>

        <td><span class="MainText">

          <textarea name="Message" id="Message" cols="23" rows="5"></textarea>

        </span></td>

      </tr>

      <tr>

        <td> </td>

        <td> </td>

      </tr>

      <tr>

        <td> </td>

        <td><input name="Clear" type="reset" class="MainText" id="Clear" value="Clear" />

        <input name="Submit" type="submit" class="MainText" id="Submit" value="Submit" /></td>

      </tr>

    </table>

   <input type="hidden" name="recipients" value="xporcellx@gmail.com" />

  </form>

The mailing list form on the homepage doesn't work either, I got this error...

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in/home/content/s/w/e/sweb09/html/mailinglist.php on line 8

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in/home/content/s/w/e/sweb09/html/mailinglist.php on line 9

Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in/home/content/s/w/e/sweb09/html/mailinglist.php on line 9

Here's the code I used for the mailing list form, I'll attach my mailinglist.php file as well...

<form method="post" action="http://www.sdesignsstore.com/mailinglist.php">

<input name="message" type="text" value="Enter email address" />

<input type="submit" value="send" />

</form>

This topic has been closed for replies.

1 reply

David_Powers
Inspiring
January 19, 2010

Confusingly, there are two separate questions here. It looks as though you failed to get FormMail working, so tried a script of your own.

I have never used FormMail, but a quick read through the instructions and help files reveals that you have used the wrong value for $TARGET_EMAIL on line 256. It should look like this:

$TARGET_EMAIL = array(EMAIL_NAME."@gmail\.com$");

As for the script in mailinglist.php, it looks as though you have created it in a program like TextEdit, and saved it in Rich Text Format. It's full of garbage like this:

{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf250
{\fonttbl\f0\fswiss\fcharset0 ArialMT;}
{\colortbl;\red255\green255\blue255;\red131\green188\blue255;}
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\deftab720
\pard\pardeftab720\ql\qnatural

\f0\i\fs24 \cf0 <? \

For the simple form you have created, the script should look like this:

<?php

$to = 'me@example.com'; // use your own email address

$subject = 'Contact from your website';

$message = $_POST['message'];

mail($to, $subject, $message);

?>

xslamxAuthor
Inspiring
January 19, 2010

I have this figured out, thanks!  Seems that the program that I used to write the code, TextEdit, garbled it all up.  I downloaded TextWrangler and it worked like a charm!