$username Posted October 6, 2008 Share Posted October 6, 2008 Hello All, I am trying to find out how to display text from MySQL that was entered by using a textbox HTML So when I do a echo echo from a database field that had text entered from a text field it does not add the spaces and return lines. But when I echo it in to a html text box it does display the return characters. Does this makes sence and is there a way to make this work? Thanks Brett Link to comment https://forums.phpfreaks.com/topic/127244-solved-displaying-text-from-mysql/ Share on other sites More sharing options...
dennismonsewicz Posted October 6, 2008 Share Posted October 6, 2008 can you post the code you are working with? Link to comment https://forums.phpfreaks.com/topic/127244-solved-displaying-text-from-mysql/#findComment-658143 Share on other sites More sharing options...
F1Fan Posted October 6, 2008 Share Posted October 6, 2008 I would suggest using htmlentities() to encode it before inserting it into the DB, then use html_entity_decode() when pulling it out. Link to comment https://forums.phpfreaks.com/topic/127244-solved-displaying-text-from-mysql/#findComment-658149 Share on other sites More sharing options...
$username Posted October 6, 2008 Author Share Posted October 6, 2008 Thanks F1Fan that is what I was looking for. Brett Link to comment https://forums.phpfreaks.com/topic/127244-solved-displaying-text-from-mysql/#findComment-658162 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.