robert_gsfame Posted June 2, 2010 Share Posted June 2, 2010 i have textarea and when i try to insert it into my database, i found this " " i am not sure what cause that  appeared in my database can give me a clue?? Link to comment https://forums.phpfreaks.com/topic/203611-%C3%A2-what-is-this/ Share on other sites More sharing options...
TGWSE_GY Posted June 2, 2010 Share Posted June 2, 2010 are you striping slashes? Link to comment https://forums.phpfreaks.com/topic/203611-%C3%A2-what-is-this/#findComment-1066537 Share on other sites More sharing options...
robert_gsfame Posted June 2, 2010 Author Share Posted June 2, 2010 what do u mean striping slashes?? i just insert this "Text :B " then everything mess up when inserting the record i use get_magic_quotes as i use mysql_real_escape_string but i've done all my best and still get the same result :'( Link to comment https://forums.phpfreaks.com/topic/203611-%C3%A2-what-is-this/#findComment-1066539 Share on other sites More sharing options...
robert_gsfame Posted June 2, 2010 Author Share Posted June 2, 2010 i still couldn't find the answer for this below is the code function clean($string) { if(get_magic_quotes_gpc()) { return stripslashes($string); }else{ return $string; } } $message=$_POST['message'] $insertquery=mysql_query(sprintf("INSERT INTO table(message)VALUES('%s')", mysql_real_escape_string($message))); and the result i got is this : Hello My name is :B * italic one is emoticon tag Link to comment https://forums.phpfreaks.com/topic/203611-%C3%A2-what-is-this/#findComment-1066559 Share on other sites More sharing options...
Pikachu2000 Posted June 2, 2010 Share Posted June 2, 2010 I don't see where you are actually passing the value of $_POST['message'] to the clean() function. Is that done elsewhere in the script? Link to comment https://forums.phpfreaks.com/topic/203611-%C3%A2-what-is-this/#findComment-1066626 Share on other sites More sharing options...
kenrbnsn Posted June 2, 2010 Share Posted June 2, 2010 Are you actually typing in a double quote " or are you cutting/pasting from a Microsoft product like Word? Microsoft Word has things called "Smart Quotes" which will appear like that if you try to display them on a web page. Ken Link to comment https://forums.phpfreaks.com/topic/203611-%C3%A2-what-is-this/#findComment-1066629 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.