How to insert EMOJI - SMARTFONES in MySQL database with PHP? [duplicate]

11

Well, as the question is very self explanatory, I will only reinforce the question.

I have an APP system of conversation, which through HTML , I command for PHP with Ajax , but if the user tries to insert some emoji in> (emotion) of your device in the database it receives: "????" as a message.

How can I change this so that I receive some type of code for each emotion and the site lists it according to its value?

    
asked by anonymous 03.08.2015 / 18:16

2 answers

2

Live,

Briefly, you will need to convert the data added by the users, taking into account the type of device used. The most usual is having to convert to Unified. I leave here the link with the code ready to work. Say it if you have problems.

See here http://code.iamcal.com/php/emoji/ .

    
08.08.2015 / 17:10
-3

A simpler way is to add the emoji within the message as a span with a specific class in the CSS that matches it. In the database, save the message normally as HTML.

    
04.08.2015 / 17:14