joecooper Posted February 26, 2006 Share Posted February 26, 2006 I have a textbox that all the info gets submitted to a MySQL DB. but when i load it up again, its all on 1 line. when i use <br> it does go on seperate lines, but i need it to do that without that.any ideas?Thanks! Link to comment https://forums.phpfreaks.com/topic/3603-mysql-with-textbox/ Share on other sites More sharing options...
AndyB Posted February 26, 2006 Share Posted February 26, 2006 Take the textbox content 'as is' and place it in the database. When you want to display it with those newlines converted to html <br>, use the newlinestoBR function:[code]echo nl2br($your_database_field);[/code]Is that what you meant? Link to comment https://forums.phpfreaks.com/topic/3603-mysql-with-textbox/#findComment-12488 Share on other sites More sharing options...
joecooper Posted February 26, 2006 Author Share Posted February 26, 2006 i dont think you quite understood.when i submit infomation from textbox and i use enter to make a newline and not <br>, when i load it with echo, it gives it on one line. i dont want that, i want it to appear exactly how i typed it Link to comment https://forums.phpfreaks.com/topic/3603-mysql-with-textbox/#findComment-12490 Share on other sites More sharing options...
crystalthunder Posted February 26, 2006 Share Posted February 26, 2006 I dont quite understand what you mean, but maybe you could wrap the text around with <pre> ... </pre>. This would display the text with the exact format that it was typed in. Link to comment https://forums.phpfreaks.com/topic/3603-mysql-with-textbox/#findComment-12496 Share on other sites More sharing options...
joecooper Posted February 26, 2006 Author Share Posted February 26, 2006 Thats what i needed! Thanks! Link to comment https://forums.phpfreaks.com/topic/3603-mysql-with-textbox/#findComment-12568 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.