Fsoft Posted July 26, 2009 Share Posted July 26, 2009 Hello, I use a HTML form and when I write data, to my database.. This is a test article. Everything should look like this. Life is good, I love my life. But when I get back the result, it gives me : This is a test article.rnrnEverything should look like this.rnrnLife is good, I love my life. Please help me.. I really need help, why it's giving me this text like this? Thanks, FAISAL! Quote Link to comment https://forums.phpfreaks.com/topic/167539-solved-mysql-output-problem/ Share on other sites More sharing options...
GingerRobot Posted July 26, 2009 Share Posted July 26, 2009 I'd assume you're applying stripslashes unnecessarily. Quote Link to comment https://forums.phpfreaks.com/topic/167539-solved-mysql-output-problem/#findComment-883464 Share on other sites More sharing options...
Alex Posted July 26, 2009 Share Posted July 26, 2009 When you're outputting apply nl2br() to it as well. Quote Link to comment https://forums.phpfreaks.com/topic/167539-solved-mysql-output-problem/#findComment-883465 Share on other sites More sharing options...
Fsoft Posted July 26, 2009 Author Share Posted July 26, 2009 Well, I removed the stripslashes from my security function : Now when I go to mysql database and see , I can find : But when I see in my output file, I see : he is cool you are not lke him he is the best It just gives up the text in one line. But in real, it is in three lines that is confusing Please help. FAISAL! Quote Link to comment https://forums.phpfreaks.com/topic/167539-solved-mysql-output-problem/#findComment-883470 Share on other sites More sharing options...
vineld Posted July 26, 2009 Share Posted July 26, 2009 What does your code look like? Do you display it on a web page or in a textarea or somewhere else? User mysql_real_escape_string for security. Quote Link to comment https://forums.phpfreaks.com/topic/167539-solved-mysql-output-problem/#findComment-883485 Share on other sites More sharing options...
GingerRobot Posted July 26, 2009 Share Posted July 26, 2009 When you're outputting apply nl2br() to it as well. Quote Link to comment https://forums.phpfreaks.com/topic/167539-solved-mysql-output-problem/#findComment-883523 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.