marcosmansi says

Hello friends.

I’m having a hard time setting the charset = utf-8 or charset iso-8859-1 where and which one should I use this form?

<?php $strings = array( ‘charset’ ?> ‘utf-8’, ‘store_name’ => ‘monomol’, ‘subject’ => ‘Nova Order para monomo.com.br’, ‘mailBuyer’ => $_POST[‘email’], ‘mailSeller’ => ‘momomom@momomomo.com.br’, ‘subjectForBuyer’ => ‘Sua Order para monomom.com.br’, ‘order_number’=>‘Order Numero:’, ‘date’=>‘Data’, ‘phone’=>‘Tel.:’, ‘zip’=>‘CEP:’, ‘address’=>‘End.:’, ‘description’=>‘Descrio’, ‘city’=>‘Cidade:’, ‘quantity’=>‘Quantidade’, ‘total’=>‘Total’, ‘notes’=>‘Ficou sabendo atraves de ? ’, ‘key’ =>‘ffffffffffffhgdjshg’ //no not change this );

if($strings[‘key’] == $_POST[‘key’]){

$email = ””; $email .= ‘ E-Mail HTML body,td,th,h1,h3 { font-family: Arial, Helvetica, sans-serif; font-size:12px; color:#ffa5a5; } th { background-color: #b90000; border-bottom-width: 2px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #999; border-bottom-color: #999; padding: 10px; border-right-width: 0px; border-left-width: 0px; vertical-align: middle; font-family: “Arial”; font-size: 14px; color: #FFF; } .h1 { font-family: “Arial”; font-size: 24px; font-weight: normal; color: #FFF; } .h3 { font-family: “Arial”; font-size: 18px; font-weight: normal; color: #FFF; } .h2 { font-family: “Arial”; font-size: 16px; font-weight: normal; color: #FFF; } .cell { padding: 10px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #800000; font-family: “Arial”; font-size: 14px; font-weight: normal; color: #FFF; } .notes { padding: 10px; background-color: #ccc; font-family: “Arial”; color: #B90000; font-size: 14px; font-weight: normal; }
’.$strings[“order_number”].’   ’.saveNumberOrder().’
’.$strings[“date”].’   ’.date(‘jS \of M Y ’).’ – ’.date(‘h:i A’).’
 
’.$_POST[“name”].’
’.$strings[“mailBuyer”].’ ’.$strings[“address”].’ ’.$_POST[“address”].’
’.$strings[“phone”].’ ’.$_POST[“phone”].’ ’.$strings[“city”].’ ’.$_POST[“city”].’
’.$strings[“zip”].’ ’.$_POST[“zip”].’
   
’;

$cont = 1;

do{
$item = 'item_name_'.$cont;
$item_name = 'item_name_'.$cont;
$item_number = 'item_number_'.$cont;
$item_amount = 'amount_'.$cont;
$item_quantity = 'quantity_'.$cont;

$email.=’

’;

$cont++; }while($cont < $_POST[“totalItems”]+1);

$email.=’
’.$_POST[$item_name].’
Product ID:’.$_POST[$item_number].’
’.$_POST[$item_quantity].’
’.$strings[“notes”].’
’.$_POST[“message”].’
’;

if(@mail($strings[‘mailSeller’], $strings[‘subject’], $email, “From: ”.$strings[‘mailBuyer’].”\r\nContent-type: text/html\r\n”)){ @mail($strings[‘mailBuyer’], $strings[‘subjectForBuyer’], $email, “From: ”.$strings[‘mailSeller’].”\r\nContent-type: text/html\r\n”); echo “success”; }else{ echo “error”; } }

function saveNumberOrder(){

$fileController = @fopen(“number_order_form.txt”,”r+”);

if($fileController == false){ $fileController = fopen(“number_order_form.txt”,”w+”); $counter = 1; fputs($fileController,$counter); fclose($fileController); }else{ while(!feof($fileController)){ } ?>

$buffer = fgets($fileController); 
        $counter = (int)($buffer) + 1;
    } 
rewind($fileController); 
fputs($fileController,$counter);
fclose($fileController);
}
return $counter;

Thanks!!!

Posted 2 years ago Permalink