[thelist] PHP Mail and   ç é ê é

charles stuart javascript at enure.net
Thu May 5 16:15:12 CDT 2005


Hi,

I'm implementing a simple contact form with PHP (code below). It's for 
a business that works with french speakers, so it needs to properly 
handle special characters.

When these characters are sent: Â Â ç é ê é

The email sent displays them as such: Â Â ç é ê é

Thanks for any help.


best,

Charles




        <?php

         if ($_POST)
         {
             $name 					= stripslashes(strip_tags($_POST['name']));
             $email 				= stripslashes(strip_tags($_POST['email']));
             $text 					= stripslashes(strip_tags($_POST['text']));

			if ($name != "" && $email != ""  && $text != "")
				
			{
             	
             	$message = "$name ($email) has contacted you via the 
website.\n\n$text";

             	mail("someone at enure.net", "Contact via the website", 
$message);

               echo "<p><em>Thank you.</p>\n";
			}		
				else
			  	{
			  	echo "error message...";
				}
         }
         else
         {

         ?>


<form action="<?= $PHP_SELF ?>" method="post" id="sendmail">


	<label for="text">Your Message:</label><br />
	<textarea class="styled" name="text" rows=""></textarea><br />
	
      <label for="name">Name:</label><br />
	<input class="styled" type="text" name="name" /><br />

      <label for="email">Email Address:</label><br />
      <input class="styled" type="text" name="email" /><br />

     <input type="submit" value="Submit" name="Submit" /><br />

</form>

	   <?php

         }

         ?>



More information about the thelist mailing list