Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.


Results 1 to 2 of 2

Thread: PHP form not sending special characters correctly

  1. #1

    PHP form not sending special characters correctly


    I am using PHP to send a flash form. The only problem I found is that I can't receive the correct special characters. Can anyone tell me what I can change in my code?

    PHP Code:
    //Powered by SymbolBox.pt


    $numero =  $_POST["numero"];
    $euMail "info@ruiganga.com";
    $euNome "RuiGanga.com";

    // CLIENTE
    $nome                            =  $_POST["nome"];
    $email                            =  $_POST["email"];
    $contacto                        =  $_POST["contacto"];
    $morada                            =  $_POST["morada"];
    $msg                            =  $_POST["msg"];

    // COMPRA
    $lista                            =  $_POST["lista"];
    $totalAPagar                    =  $_POST["totalAPagar"];
    $totalDeFotos                    =  $_POST["totalDeFotos"];
    $metodoDeEnvio                    =  $_POST["metodoDeEnvio"];


    $mens   =  "---------------------------------------------------------------------\n";
    $mens  .=  "ENCOMENDA N.º "$numero ."\n";                    
    $mens  .=  "---------------------------------------------------------------------\n";
    $mens  .=  "DADOS DA ENCOMENDA\n";
    $mens  .=  "---------------------------------------------------------------------\n";
    $mens  .=  "NOME: ".$nome." \n";
    $mens  .=  "MORADA: ".$morada."\n";
    $mens  .=  "CONTACTO: ".$contacto."\n";
    $mens  .=  "---------------------------------------------------------------------\n";
    $mens  .=  "MENSAGEM: ".$msg."\n";
    $mens  .=  "---------------------------------------------------------------------\n";
    $mens  .=  "ENCOMENDA: ".$lista."                                            \n";
    $mens  .=  "---------------------------------------------------------------------\n";
    $mens  .=  "TOTAL DE FOTOS: ".$totalDeFotos."\n";
    $mens  .=  "TOTAL A PAGAR: ".$totalAPagar."\n";
    $mens  .=  "MÉTODO DE ENVIO: ".$metodoDeEnvio."\n";
    $mens  .=  "---------------------------------------------------------------------\n";
    $mens  .=  "---------------------------------------------------------------------\n";
    $mens  .=  "---------------------------------------------------------------------\n";


    //$ok = mail($v_from, "Registo de Newsletter do Site".$v_site."", $mens, $headers . "From:".$v_nome." <".$v_email.">");
    $ok mail($euMail"ENCOMENDA N.º "$numero ." de ".$nome$mens"From:".$nome." <".$email.">"$headers);


    $mens2 =  "Exmo.(a) Sr.(a) ".$nome." \n";
    $mens2.=  "\n";
    $mens2.=  "Desde já agradecemos a sua encomenda n.º ".$numero.". \n";
    $mens2.=  "\n";
    $mens2.=  "Total de Fotos:".$totalDeFotos."\n";
    $mens2.=  "Método de Envio:".$metodoDeEnvio."\n";
    $mens2.=  "Número das Fotos(quantidade):".$lista."\n";
    $mens2.=  "\n";
    $mens2.=  "Deverá efectuar o pagamento da sua encomenda por transferência bancária e depois fazer-nos chegar o\n";
    $mens2.=  "respectivo comprovativo ou número de transacção por email.\n";
    $mens2.=  "\n";
    $mens2.=  "NIB: 0033 0000 45300558822 05\n";
    $mens2.=  "Total a Pagar:".$totalAPagar."\n";
    $mens2.=  "\n";
    $mens2.=  "Após a recepção do seu pagamento a sua encomenda será processada. Caso exista necessidade de entrar \n";
    $mens2.=  "em contacto consigo utilizaremos os dados por si indicados. Por favor confirme e se não estiverem \n";
    $mens2.=  "correctos rectifique-os respondendo a este email.\n";
    $mens2.=  "\n";
    $mens2.=  "Contacto:".$contacto."\n";
    $mens2.=  "Morada:".$morada."\n";
    $mens2.=  "\n";
    $mens2.=  "Para qualquer esclarecimento adicional contacte: 936 746 845.\n";
    $mens2.=  "\n";
    $mens2.=  "\n";
    $mens2.=  "Atenciosamente\n";
    $mens2.=  "\n";
    $mens2.=  "RuiGanga.com\n";

    $ok2 mail($email"ENCOMENDA N.º "$numero .""$mens2,  "From:".$euNome." <".$euMail.">");



  2. #2

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About kirupa.com Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012