bilis_money Posted July 13, 2006 Share Posted July 13, 2006 If hope this is possible.i want to input [code]"<br>Testing<b>"[/code] inside MySQL database.and to be able to display it back up again in <HTML> format string.Is this possible? a simple snippet of codes for this will bendicate me.thank you very much in advance. Quote Link to comment https://forums.phpfreaks.com/topic/14540-how-to-input-formatted-string-inside-mysql-table/ Share on other sites More sharing options...
bilis_money Posted July 13, 2006 Author Share Posted July 13, 2006 i guess the function --> htmlspecialcharswill solve this problem, ok i'll try to figure it out by myself.But if you have smarter way to do this then please tell me. Quote Link to comment https://forums.phpfreaks.com/topic/14540-how-to-input-formatted-string-inside-mysql-table/#findComment-57656 Share on other sites More sharing options...
kenrbnsn Posted July 14, 2006 Share Posted July 14, 2006 When storing the string in your database use the function mysql_real_escape_string(), when sending it to the browser, use htmlentities().Ken Quote Link to comment https://forums.phpfreaks.com/topic/14540-how-to-input-formatted-string-inside-mysql-table/#findComment-57658 Share on other sites More sharing options...
bilis_money Posted July 14, 2006 Author Share Posted July 14, 2006 thanks ken! Quote Link to comment https://forums.phpfreaks.com/topic/14540-how-to-input-formatted-string-inside-mysql-table/#findComment-57797 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.