User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 425,789 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,178 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 493 | Replies: 4
Reply
Join Date: Dec 2007
Posts: 28
Reputation: mgn2683 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
mgn2683's Avatar
mgn2683 mgn2683 is offline Offline
Light Poster

Formatting blob fields

  #1  
Jan 7th, 2008
I am running into a problem where users insert their data into a textarea, which is then sent to a corresponding table in Heidisql. When the user clicks on the print button, it recalls the information to be printed. However, all the paragraph breaks and formatting, which is still present in Heidi, is lost upon the recall. I keep finding little bits on explode, does anyone have any advice on what I can do to stop the condensing of text and losing all the formatting? Thanks.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2006
Location: South Wales
Posts: 159
Reputation: phper is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 11
phper's Avatar
phper phper is offline Offline
Junior Poster

Re: Formatting blob fields

  #2  
Jan 7th, 2008
Hi,

Heidisql is just your GUI that displays data from your MySQL database. If you post again use MySQL so people now what DB your using.

When you submit that data to the database are the, for example: "<BR/>", being saved? Or is it just pure text?

Regards,
Alex.

http://www.ajtrichards.co.uk
If you find my post useful please add to my reputation!! Thanks!

ajtrichards web solutions
http://www.ajtrichards.co.uk
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 240
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: Formatting blob fields

  #3  
Jan 7th, 2008
Use nl2br() to retain the format.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Jul 2006
Posts: 191
Reputation: vssp is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 5
vssp vssp is offline Offline
Junior Poster

Re: Formatting blob fields

  #4  
Jan 7th, 2008
use htmlentities
Thanks
VSSP
Reply With Quote  
Join Date: Dec 2007
Posts: 28
Reputation: mgn2683 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
mgn2683's Avatar
mgn2683 mgn2683 is offline Offline
Light Poster

Re: Formatting blob fields

  #5  
Jan 16th, 2008
Ok now I have been able to format the text in the blob by using the convert- New lines to BRs in the dynamic text window. It keeps all the formatting except for apostrophes and quotations. Is there any secondary formatting that I could add to recognize and retain the quotations? Any help is greatly appreciated.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the PHP Forum

All times are GMT -4. The time now is 3:15 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC