mysql - funny square characters added to the value when inserting it into table

Posted by stone on Stack Overflow See other posts from Stack Overflow or by stone
Published on 2010-05-13T19:19:44Z Indexed on 2010/05/13 19:24 UTC
Read the original article Hit count: 368

Filed under:

Hi,

I have a php script that inserts values into mySQL table

INSERT INTO stories (title) VALUES('$_REQUEST[title]);

I checked the values of my request variables before going into the table and it's fine.

But when I add title=john to the table for example,

I get something like this: title = "[][][][]john" and when I extract the value, it's a newline then john.

I have my columns set to utf-8, I tried swedish character set as well.

Note: I don't get this error when inserting values from the phpMyAdmin commandline

© Stack Overflow or respective owner

Related posts about mysql