J
J
Jack OXO2015-01-28 15:13:47
PHP
Jack OXO, 2015-01-28 15:13:47

How to change encoding in php form?

Created a form using a generator . There are such variables in the php file:

$form->field_rules = array(
    'name'=>'required',
    'email'=>'email|required',
    'tel'=>'required',
    'model'=>'',
    'tabletop'=>'',
    'formkitchen'=>'',
    'dimensions'=>'',
    'equipment'=>'',
    'otherequipment'=>'',
    'comments'=>''
);

I fill everything in Russian, but the following comes to the mail:
ааАаКаАаЗ баАббаЕбаА аКббаНаИ: 
name :  ааКбаИаИ 
email :  [email protected]
tel :  33333333333 
model :  ааАаЛаЕаНбаИаНаА 
tabletop :  абаКббббаВаЕаНаНбаЙ аКаАаМаЕаНб 
formkitchen :  аббаМаАб 
dimensions :  324 
equipment :  аббаОаВаОаЙ баКаАб 
otherequipment :  ббаВаА 
comments :  баВбаАбб аА

How can you assign arbitrary text values ​​to the variables above, for example, instead of the "dimensions" variable, write "Headset dimensions"? And how to fix these bugs, where to change the encoding? The form is here . Sources are here .
Thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Shamanov, 2015-01-28
@oxojeck

You need to set the encoding of the letter, if the mbstring extension is enabled, then you can send using mb_send_mail , details at the link.

N
Nikita Souvel, 2015-01-28
@Souvel1

Create a .htaccess file and add the following line to it:
AddDefaultCharset utf-8

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question