How to save the text control format to MYSQL

Source: Internet
Author: User
How can I save the text control format to MYSQL? if I do not use the editor plug-in, how can I save the text control format to MYSQL? I want to save the following textbox1.text content to MYSQL: 'Saved format '. "\ n ". the 'control symposition' is saved in the format of & nbsp; 'when it is saved to MYSQL. "\ n ". control symbol '& nbsp; how to save the text control format to MYSQL
How can I save the text control format to MYSQL without using the editor plug-in?
To save the following textbox1.text content to MYSQL: 'Save format '. "\ n". 'control symposition'
When saved to MYSQL, it will be: 'Saved format. "\ n". control symbol'
An entire string. The line break "\ n" in the middle is invalid. how can I make "\ n" saved in MYSQL and read it in php? Share:
------ Solution --------------------
Can you view the line feed in the command line query? you can view the source code on the page.
------ Solution --------------------
Reference:
This is the case now.
Http://www.asnewmart.com/test.php


Understand what you mean

Try this: before saving $ str = htmlspecialchars ($ str );
Output nl2br ($ str) when reading );

You are not sure whether the first step requires the second step.

I will write a demo later. you can try it first.
------ Solution --------------------
\ N is the line feed of the text. you must view the source code to see it.
To display line breaks on the html page, use the nl2br () function to process them.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.