Hello. I use a text box to insert data to mysql. The box is secured with the following: mysql_real_escape_string(stripslashes(trim(htmlent ities(strip_tags( $_POST['text_box'] ))))); When i type in tʰe it stores it into the database but when showing,it appears: "& # 6 8 8 ;" ( with no space beetween letters because here it shows correctly if i have no space) where is the solution?
When you insert data to mysql, you use: mysql_real_escape_string($_POST['text_box']) Code (markup): When you retrieve data from mysql, you use: stripslashes($value) Code (markup):
"htmlent ities" is the php code that to transforming the string into html syntax. You could use html_entity_decode to undo that for the text box field. Don't store the info like that decoded though cause it defeats the purpose of changing the chars into html syntax.