Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 3rd, 2006, 04:13 AM
Registered User
Join Date: Jul 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jcsnyder
Default inserting BLOB into MySQL DB, carriage newline

Hello. I am trying to insert text into a mysql database as a blob type, and later I retrieve the blob entry from the database and output it, again as text.

When you insert text as a blob into a database, and then output it, tags like <b>Hello!</b> do work and the text is outputted as bold, and the carriage return <br> and new paragraph <p> work as well.

However, what i want is when you enter the text to input into the database in the text box, and click the enter key to put it on a new line, I would like my php code to determine when the user inputted a new line and to add the appropriate <br> tags before entering the blob into the database. Then when the text is outputted, it has the <br> tag and will show the stuff after the <br> tag on the next line.

Any help would be great.

jcsnyder at gmail dot com

Reply With Quote
  #2 (permalink)  
Old September 8th, 2006, 12:51 PM
Registered User
Join Date: Sep 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

[www.php.net/nl2br] nl2br is the function that you want to use on your text before putting it into the db

I wish my computer would do what I want it to do, not what I tell it to do
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting 'NewLine' in output mphare XSLT 3 February 22nd, 2007 07:18 PM
problem with uploading blob data to MySQL DB kyle_shea PHP Databases 1 March 8th, 2005 06:15 PM
Problem inserting blob data/uploading file - MySQL kyle_shea Beginning PHP 2 February 15th, 2005 10:18 AM
inserting blob data into database taoufik Beginning PHP 2 November 19th, 2004 09:28 AM
HELP Inserting Carriage Return orangem Classic ASP Databases 8 July 5th, 2004 08:36 PM

All times are GMT -4. The time now is 10:01 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.