Jump to content

cosmoasif

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Everything posted by cosmoasif

  1. PFMaBiSmAd thank you for the reply.....is there any other way than OUTPUT BUFFERING? I am a beginner at Php. I just need to redirect to thank you page once the form is sent
  2. Hi I have a from, now after the users send the form, i want to redirect to a thank you page. my code does not redirect and gives me this error Warning: Cannot modify header information - headers already sent by (output started at D:\inetpub\vhosts\feelmalaysia.com\httpdocs\sendmailsqlar.php:1) in D:\inetpub\vhosts\feelmalaysia.com\httpdocs\sendmailsqlar.php on line 25 I have the redirect page saved in the same directory as the php file. my Php Code : <?php $headers .= 'Content-type: text/plain; charset=UTF-8; format=flowed' . "\r\n"; $headers .= 'Content-Transfer-Encoding: 8bit'."\r\n"; $to = "xxx@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, '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $header, $headers); //Sending auto respond Email to visitor $reply_header = "From: xxx@xxx.com\n" . "Reply-To: xxx@xxx.com\n"; $reply_subject = "- تم استلام طلبكم"; $reply_to = "$visitormail"; $reply_message = "$visitor \n\n شكرا لزيارتكم موقعنا . \n نود ابلاغكم بأنه تم استلام طلبكم وسوف يتم الرد عليكم قريبا.\n هذه الرسالة مرسلة من نظام الموقع.\n شكرا\n "; mail($reply_to, '=?UTF-8?B?'.base64_encode($reply_subject).'?=', $reply_message, $reply_header, $headers); header('Location: thankyouar.html'); ?> Please help . Thank you
  3. thank you moderator...i searched some more and got it working had to add these $headers .= 'Content-type: text/plain; charset=UTF-8; format=flowed' . "\r\n"; $headers .= 'Content-Transfer-Encoding: 8bit'."\r\n"; mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $header, $headers); '=?UTF-8?B?'.base64_encode($subject).'?=' - this must be added like i added it up
  4. it didnt work for me ...im not sure what is wrong there
  5. Anyone here to help or im just wasting my time waiting for a reply i need help pls
  6. anyone !!!!!! pls help .........
  7. Nope it didnt work. I put $headers .= "Content-Type: text/html; charset=UTF-8\n"; but it didnt work still
  8. 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. 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 the HTML and Php Here is my HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="ar" xml:lang="ar" xmlns="http://www.w3.org/1999/xhtml"> <head> <link href="../../css/cssfinal.css" type="text/css" rel="stylesheet"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Language" content="ar"> <title>Untitled Document</title> <style type="text/css"> <!-- body { background-color: #FFFFFF; } .style8 {color: #FF0000} --> </style> <script src="../../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <script src="../../SpryAssets/SpryValidationSelect.js" type="text/javascript"></script> <link href="../../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> <link href="../../SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" /> </head> <body> <table align="center" width="547" border="0" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table> <form method="post" name="enquiry" action="sendmailsqlar.php"> <table width="547" align="center" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="101" background="../../images/formhead.png"><div align="center" class="status" style="margin-bottom:20px; margin-top:20px">نموذج الاستفسار عن الدورة الأكاديمية</div></td> </tr> </table> <table width="547" border="0" align="center" cellspacing="0" cellpadding="0"> <tr> <td width="275"><div align="right"><input name="Name" type="text" id="visitor" value="" size="36" class="field" /></div></td> <td width="272" align="right"><div style="margin-left:25px; margin-bottom:10px; margin-top:10px; font-size:18px;"> <div style="margin-right:25px;">الاسم</div> <span id="sprytextfield1"><span class="textfieldRequiredMsg">مطلوب</span></span></div></td> </tr> <tr> <td><div align="right"><input name="Email" type="text" id="visitormail" size="36" class="field" /></div></td> <td align="right"><div style="margin-left:25px; margin-bottom:10px; margin-top:10px; font-size:18px;"> <div style="margin-right:25px;">البريد الإلكتروني</div> <span id="sprytextfield2"><span class="textfieldRequiredMsg">مطلوب</span><span class="textfieldInvalidFormatMsg">غير صحيح </span></span></div></td> </tr> <tr> <td><div align="right"><input name="Nationality" type="text" id="nationality" size="36" class="field" /></div></td> <td align="right"><div style="margin-left:25px; margin-bottom:10px; margin-top:10px; font-size:18px;"> <div style="margin-right:25px;">الجنسية</div> <span id="sprytextfield2"><span class="textfieldRequiredMsg">مطلوب</span></span></div></td> </tr> <tr> <td align=""><div align="right"> <select name="Level" id="stulevel" size="1" class="select"> <option value=""><span class="drop.Text">(إختر)</span></option> <option value=" Foundation/Diploma ">دبلوم</option> <option value=" Bachelor Degree ">البكالوريوس</option> <option value=" Master Degree ">ماجستير</option> <option value=" PhD./Others ">دكتوراه</option> </select> </span></div></td> <td align="right"><div style="margin-left:25px; margin-bottom:10px; margin-top:10px; font-size:18px;"> <div style="margin-right:25px;">المرحلة الدراسية المطلوبه</div> <span id="spryselect1"><span class="selectRequiredMsg">مطلوب</span></span></div></td> </tr> <tr> <td><div align="right"><input name="Field" type="text" id="stfield" size="36" class="field" /></div> </td> <td align="right"><div style="margin-left:25px; margin-bottom:10px; margin-top:10px; font-size:18px;"> <div style="margin-right:25px;">مجال الدراسة \ التخصص</div> <span id="sprytextfield3"><span class="textfieldRequiredMsg">مطلوب</span></span></div></td> </tr> <tr> <td colspan="2"><table width="547" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="275"><label> <div align="right"><textarea name="Message" style="background-color:#ccc2b2" class="field" id="message" cols="27" rows="6"></textarea></div> </label></td> <td width="272" align="right"><div style="margin-left:25px; margin-bottom:10px; margin-top:10px; font-size:18px;"> <div style="margin-right:25px;">ملاحظات</div> </div></td> </tr> </table></td> </tr> <tr> <td colspan="2" height="101" background="../../images/formfoot.png"><div align="center" style="margin-top:15px"> <input type="submit" class="btn1" value="إرسال" /> </div></td> </tr> </table> </form> <script type="text/javascript"> <!-- var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "email"); var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3"); var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1"); var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4"); //--> </script> </body> </html> Here is the PHP <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"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; 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 ."; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail($reply_to, $reply_subject, $reply_message, $reply_header); header("Location: thankyouar.html"); ?> please help !!!! i would appreciate
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.