hi, my email form is written in php, it does not support multiple languages i mean unicode fonts. it shows something like this: খোলা জানালা . In this case what i should do.

Member Avatar for diafol

Show your code. Email should support unicode. Depends how the data is being sent too.

ok
contact.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Contact</title>
<style type="text/css">
<!--
.style2 {font-family: Arial, Helvetica, sans-serif; font-size: 14px;}
.style3 {
    font-size: 10px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style6 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8px; }
.style7 {color: #FF0000}
-->
</style>
</head>
<body>
<table width="100%" border="0">
  <tr>
    <td width="63%"><form action="pub-process.php" method="post" class="style2">

<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
<form><input type="text" name="name" value="Your Name" size="60" maxlength="45"/><br /><input type="text" name="emailaddress" value="Email Address" size="60" maxlength="45"/><br /><input type="text" name="subject" value="Subject" size="60" maxlength="45"/><br /><input type="text" name="description" value="Description" size="60" maxlength="45"/><br />
<input type="submit" value="E-mail It" />
<br />
</form></td>
  </tr>
</table>
</body>

send.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Thanks</title>
</head>
<body>
<?php
$name = $_POST['name'];
$emailaddress = $_POST['emailaddress'];
$subject = $_POST['subject'];
$description = $_POST['description'];
if (eregi('fun', $name)) {
die ("Dont do");
}
$todayis = date("l, F j, Y, g:i a") ;
$subject = $name;
$message = "<h1>Name: $name<br />Email Address: $emailaddress<br />Subject: $subject<br />Description: $description<br />";
    $from = "MIME-Version: 1.0" . "\r\n";
    $from .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
    $from .= "From: $emailaddress" . "\r\n";
mail("email@gmail.com", $subject, $message, $from);
?>
Thank You
</body>
</html>

so can you tell me where to change or a sample
thankyou

Member Avatar for diafol

Try this for now:

<?php
header('Content-Type: text/html; charset=utf-8');
$name = $_POST['name'];
$emailaddress = $_POST['emailaddress'];
$subject = $_POST['subject'];
$description = $_POST['description'];
if (eregi('fun', $name)) {
die ("Dont do"); //change this to a header
}
$todayis = date("l, F j, Y, g:i a") ;
$subject = $name;
$message = "<h1>Name: $name</h1><p>Email Address: $emailaddress</p><p>Subject: $subject</p>Description: $description";
    $from = "MIME-Version: 1.0" . "\r\n";
    $from .= "Content-type:text/html;charset=UTF-8" . "\r\n";
    $from .= "From: $emailaddress" . "\r\n";
    mail("email@gmail.com", $subject, $message, $from);
?>
Thank You

well, thanks for your post but still it's not working !!!

Member Avatar for diafol

See if it's the data being sent by the form as opposed to the dat being sent via mail:

<?php
header('Content-Type: text/html; charset=utf-8');
$name = $_POST['name'];
$emailaddress = $_POST['emailaddress'];
$subject = $_POST['subject'];
$description = $_POST['description'];

//THIS SHOULD SHOW what you typed - if not - this is the issue
echo $description;
exit;
//STOP CODE on exit

if (eregi('fun', $name)) {
die ("Dont do"); //change this to a header
}
$todayis = date("l, F j, Y, g:i a") ;
$subject = $name;
$message = "<h1>Name: $name</h1><p>Email Address: $emailaddress</p><p>Subject: $subject</p>Description: $description";
    $from = "MIME-Version: 1.0" . "\r\n";
    $from .= "Content-type:text/html;charset=UTF-8" . "\r\n";
    $from .= "From: $emailaddress" . "\r\n";
    mail("email@gmail.com", $subject, $message, $from);
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.