473,408 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

trouble formatting text

Hi, I'm having trouble using the proper terminology, so bear with me,
I am trying to submit text to a mysql database. I want to be able to
allow formatting of this content (like breaking it up into
paragraphs). I am sending the data to the server via ajax, and so
escape the characters.

When I read back the information on my news page, all of the
formatting is gone. Do I need to unescape the charachters somehow
using javascript or php?

Any help is appreciated
Dec 21 '07 #1
2 1387
Rozzy <ro*****@gmail.comwrote in news:50f642c7-8efd-4e4b-8234-
c4**********@21g2000hsj.googlegroups.com:
Hi, I'm having trouble using the proper terminology, so bear with me,
I am trying to submit text to a mysql database. I want to be able to
allow formatting of this content (like breaking it up into
paragraphs). I am sending the data to the server via ajax, and so
escape the characters.

When I read back the information on my news page, all of the
formatting is gone. Do I need to unescape the charachters somehow
using javascript or php?

Any help is appreciated
What is your definition of "formatting"? Line breaks? If so, are you
calling nl2br('databasevalue') before printing to the page?
Dec 21 '07 #2
..oO(Rozzy)
>Hi, I'm having trouble using the proper terminology, so bear with me,
I am trying to submit text to a mysql database. I want to be able to
allow formatting of this content (like breaking it up into
paragraphs). I am sending the data to the server via ajax, and so
escape the characters.

When I read back the information on my news page, all of the
formatting is gone. Do I need to unescape the charachters somehow
using javascript or php?
If the text was entered in a text area for example, then of course it
only contains normal line breaks. If you want to print it out as HTML,
then you either have to call nl2br() (be aware that it returns XHTML)
or - better - replace the line breaks with proper 'p' elements.

Micha
Dec 21 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Colleyville Alan | last post by:
I am using Access and have embedded the ActiveX control Formula One that came with Office 2000. (ver 3.04). I have created and formatted a spreadsheet and now I want to copy the info with...
4
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the...
6
by: Justin | last post by:
I am trying to add dollar amounts together and add sales tax but everthing after the decimal point is being cut off in the dollar amounts. Here is my code: if (Adults != "") { AdultTotal =...
16
by: scorpion53061 | last post by:
Well as some of you know I was using a tab control for a project I was building for my boss. Today he tells me that he wants: When he switches tabs to be able to switch back and see whatever...
4
by: DouglasABaker | last post by:
I'm having problems getting this to return a response in .Net, any ideas? I've been playing around with WebRequest/WebResponse, is that what I should use? Thanks sXMLMessage = "<?xml version="...
14
by: Scott M. | last post by:
Ok, this is driving me nuts... I am using VS.NET 2003 and trying to take an item out of a row in a loosely-typed dataset and place it in a label as a currency. As it is now, I am getting my...
3
by: michael sorens | last post by:
The documentation for the RichTextBox is sketchy at best. I want to do a very simple task but I cannot find information on this. I am using a RichTextBox as an output window. Some text I want to...
1
by: aman909 | last post by:
Hello, Im trying to use conditional formatting in a text box on a form. What im trying to do is that conditional formatting changes the colour of the text in the text box. I need the...
3
by: =?Utf-8?B?b24tbGluZSBqb3VybmFsIGVkaXRvcg==?= | last post by:
I can't seem to cut-and-paste text, with either .doc or .html formatting, into my .asp web-pages --all the formatting is lost. Is there some code that needs to be added to the page that will...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.