johnhuk Posted January 14, 2007 Share Posted January 14, 2007 HeyCan anyone offer any help on this..... I'm running Linux server and using Macromedia Dreamweaver MX (have 8 also but don't like it) and the results of the form are stored in a MySQL Database.I'm building a website where a user can register for full access - so.........On the registration form there is a textbox where the user can enter a description of themselves, hobbies, interests blah blah blah...When the information is entered into the DB, and then retreived into a .php page it appears with no breaks, spaces or paragraphs, even if you entered them into the text box. I've found that you manually have to enter a <'br'> tag (obviously without the apostrophies!) or two of them together to enter a new paragraph.This is not a great solution as not all users are familiar with HTML tags. Is there a way (setting in DW or such) whereby you can get test entered into the textbox to appear on pages *exactly* as it was entered *without* HTML tags? With entered breaks and paragraphs in tact?Anyone who can solve this headache for me will have my gratitude!Many thanksJohnHuk Link to comment https://forums.phpfreaks.com/topic/34124-help-with-php-forms/ Share on other sites More sharing options...
AndyB Posted January 14, 2007 Share Posted January 14, 2007 Use php's nl2br() function on the OUTPUT from the database to convert 'new lines to br' tags. Link to comment https://forums.phpfreaks.com/topic/34124-help-with-php-forms/#findComment-160505 Share on other sites More sharing options...
johnhuk Posted January 14, 2007 Author Share Posted January 14, 2007 Ok thanks...But I have to admit that this is a new one to me. Can you explain how I'd go about doing this please?Is it done in PHPMyAdmin or in Dreamweaver? It's just I've never come across this tag before!ThanksJohnHuk Link to comment https://forums.phpfreaks.com/topic/34124-help-with-php-forms/#findComment-160506 Share on other sites More sharing options...
trq Posted January 14, 2007 Share Posted January 14, 2007 [quote]It's just I've never come across this tag before![/quote]PHP doesn't have [i]tags[/i] it has functions. There are examples of [i]this[/i] functions use in the [url=http://php.net/nl2br]manual[/url]. Link to comment https://forums.phpfreaks.com/topic/34124-help-with-php-forms/#findComment-160509 Share on other sites More sharing options...
johnhuk Posted January 14, 2007 Author Share Posted January 14, 2007 Yes I know - 'twas a Freudian slip on my part.Humble apologies ;o) Link to comment https://forums.phpfreaks.com/topic/34124-help-with-php-forms/#findComment-160511 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.