/    Sign up×
Community /Pin to ProfileBookmark

none roman alphabet mysql insert problem

i am trying to get none roman caricatures imputed in from a web form to be inserted into a mysql database namely the Cyrillic characters (Russian абвгдеёжзийклмнопрстуфхцчшщъыьэю&#1103?. but for some reason i think php is doing some to the Cyrillic characters.

if i hard code my Cyrillic characters into the php mysql insert i get this in the database when i view it in phpMyAdmin: щъыьэюя
example:

[code=php]$sql = ‘INSERT INTO `xmass` (`message`) VALUES(‘ы ь э ю я’);’;[/code]

but if the text comes from a html form as a post variable i get this in that data base: абвгд

example php:

[code=php]$sql = “INSERT INTO `xmass` (`message`) VALUES ({$_POST[‘message’]})”;[/code]

$_POST[‘message’] would be from the user input from the html from on the prevues page

how do i control what is put into the data base? what is the best thing to put into the database?

and strangely if i manually input into “абвгд” into phpmyadmin “абвгд” is what i see when i view the field in phpmyadmin

i have tried turning абвгд into Cyrillic characters by using the function html_entity_decode but can’t get it to do anything

i am using php 5.2.2 and mysql 5.0.22

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @lomokev spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...