Unstoppable Domains

Contact us form, utf-8 and php??

Spaceship Spaceship
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.
AfternicAfternic
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back