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! Quote 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? Quote 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 Quote 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. Quote 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! Quote Link to comment https://forums.phpfreaks.com/topic/3603-mysql-with-textbox/#findComment-12568 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.