Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
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
Default

[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
Reply


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 06:11 PM.


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