Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modify a row..

Status
Not open for further replies.

tijerina

Vendor
Mar 4, 2003
132
US
I have php website and I upload images to my site via my php written admin tool.

I have an input box in my admin tool that is defined as this:
$prod_desc = $row['prod_desc'];

Within my admin tool web page, I can add a long text description.

The problem is when i cut and past text into the description area via my admin tool the pasted text wraps around and looks bad.

How do I modify the row that holds the description field to look like what I copied from. Or is there some HTML I can use to allow this rule.

Here is a sample of what I copy.

180 Gig.
Color is Red.
The sky is blue.
At night the sky is black.
70 years is a long time.

But when I paste it into my description field, it looks like this:

180 Gig.Colore is Red.The sky is blue.At night the sky is black.70 years is a long time.


Hope this makes sense.

 
The problem is likely that fact that HTML ignores returns in output.

You might take a look at the PHP function nl2br(). I would use this function on output going to a browser, but leave the data as-is in the database -- other non-HTML output interfaces will display the "<br>" tags the function produces.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top