NameSilo

Contact us form, utf-8 and php??

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
NamecheapNamecheap
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
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

More data. Your data. See what is new
Major update
We have made a number of features available to provide sellers more data for their domains and inquiries, and greater access to the data...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back