Insert a ? into MySQL (heart character) via PHP

notrious

New Member
I'm having a heck of a time getting ? type characters into my database using php.I've got UTF-8 setting on the page\[code\]<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\[/code\]and \[code\]<?php$line = $_REQUEST['line'];$line = stripslashes($line);$line = htmlspecialchars($line);$line = trim($line);$line = mysql_real_escape_string($line);mysql_query("SET CHARACTER SET utf8");$sql = "INSERT INTO posts (txt) values ('$line')";mysql_query($sql, $cn);?>\[/code\]the result of the insert is a ? characteri'm sure there are people who've done this, but I'm really having trouble getting it right.edit:the MySQL table's collation and field's encoding is also set to utf8_unicode_ci
 
Back
Top