Jump to content

Displaying text in html with line breaks <br> / mysql/ php


Recommended Posts

Hello,

 

I have a form in my website which allows me to type and submit a description of every item I list for sale. My html code is:

 

Description<td><textarea name = "full_description" cols = "40" rows = "10" ></textarea><br>

<tr><td>

 

After I submit the description I insert in the text area into my table (called "products") , I try to display it, it displays it but wont display it in an organized way as I typed it with the break lines or paragraphs, instead, it shows a one line. For example:

If I type in:

* Car Cradle With FM Modulator

* Remote Control

* Mini-Micro Antenna

* Power Adapter

* Mounting Accessories

* Install Guide

 

and submit , click on the page that displays it, it shows:

* Car Cradle With FM Modulator* Remote Control* Mini-Micro Antenna* Power Adapter* Mounting Accessories* Install Guide

 

unless when I type it and before I submit the form I place <br> at the end of each line ex:

* Car Cradle With FM Modulator <br>

* Remote Control<br>

etc<br>

 

In the display page, let's say I use simple php code:

$description_full = $row["description_full"];

echo" $description_full";

 

How can I get the line breaks to take effects automatically instead of typing them manually?

 

 

Thank you!

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.