Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

PHP form post Arabic Problem

the mail() function

Moderators: macek, egami, gesf

PHP form post Arabic Problem

Postby cosmoasif » Mon Nov 21, 2011 1:35 am

PHP form post Arabic

Postby cosmoasif » Mon Nov 21, 2011 5:29 pm
Hi

I have created a Post php form, It send two emails, One email to the user after they submit the form and other to me. NO DB involved. Now the users will fill up the form in arabic and a confirmation email will be sent to them in arabic also...I tested my form, I get the confirmation email in arabic, its fine, but the data tht the user inputs in arabic on the form comes to my email with strange characters.....i want to receive the data entered by user in arabic. Below is my Php code...pls help ...i have been stuck in this issue since the past one week :(


[i]my PhP Code[/i]

<html dir="rtl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="ar">
</head>
<?php
$to = "xx@xxx.com";
$visitor = $_REQUEST['Name'] ;
$visitormail = $_REQUEST['Email'] ;
$nationality = $_REQUEST['Nationality'] ;
$stulevel = $_REQUEST['Level'] ;
$stfield = $_REQUEST['Field'] ;
$message = $_REQUEST['Message'] ;
$header = "From: $visitormail\n"
. "Reply-To: $visitormail\n";
$subject = "Arab Enquiry";
$message = "From: $visitor \n\n Email: $visitormail \n\n Nationality: $nationality \n\n Level: $stulevel \n\n Field: $stfield \n\n Message: $message";
mail($to, $subject, $message, $header);

//Sending auto respond Email to visitor
$reply_header = "From: ttt@ttt.com\n"
. "Reply-To: vvv@vvv.com\n";
$reply_subject = " - تم استلام طلبكم";
$reply_to = "$visitormail";
$reply_message = "$visitor \n\n شكرا لزيارتكم موقعنا . \n نود ابلاغكم بأنه تم استلام طلبكم وسوف يتم الرد عليكم قريبا.\n هذه الرسالة مرسلة من نظام الموقع.\n شكرا\n .";
mail($reply_to, $reply_subject, $reply_message, $reply_header);

header("Location: thankyouar.html");

?>
cosmoasif
New php-forum User
New php-forum User
 
Posts: 2
Joined: Mon Nov 21, 2011 1:21 am

Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron