NameSilo

Contact us form, utf-8 and php??

SpaceshipSpaceship
NamecheapNamecheap
Namecheap AuctionsNamecheap Auctions
Watch

mulligan

Established Member
Impact
15
Im trying to build a contact us form and have gotten this far:
(Courtesy of Google!)

Anybody know what I have to do to this bit of code to make it send me the email in a variety of languages (Including English)
I am lost when it comes to php so if someone knows can you show me what I have to do?

<?php
if(isset($_POST['submit'])) {

$to = "[email protected]";
$subject = "Submissions";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];

$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";

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

} else {

echo "blarg!";

}
?>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is the form Im trying to use, but if I enter languages other than English the email I recieve is a random (to me anyway!) string of characters and is unreadable.



<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-utf-8">
<title>Name</title>
</head>

<body>
<form method="POST" action="mailer.php">
<p align="center">Name:
<input type="text" name="name" size="19"><br>
<br>
Email:
<input type="text" name="email" size="19"></p>
<p align="center">Comments:<br>
<br>
<textarea rows="9" name="message" cols="30"></textarea>
<br>
<br>
<input type="submit" value="Submit" name="submit">
</p>
</form>

</body>

</html>

Any help is appreciated, thanks
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back