php script problems, can anyone help?

  • Thread starter Thread starter Someone
  • Start date Start date
S

Someone

Guest
i recently installed a new auto classifieds script to my website, it works good except one thing, in the seller comment box, when you write in the following form. example:

2005 cadillac STS, V8, low miles.

red with white leather.

located here.

please call 123-456-7899

after writing it in the above way, once it get published, this is how it appears.

2005 cadillac STS, V8, low miles. red with white leather. located here. please call 123-456-7899

all spaces between paragraphs disappear and everything just becomes one big messy ugly paragraph.

Anyway to fix that, add some code? any ideas?
 
Make your own script. Or look at the php script and change it so it doesn't cut out newlines, its most likely deleting newlines, probably a simple fix. I still encourage you to make your own, its a good learning experience.
 
Your code probably does NOT cut out anything like Travis S wrote; it's a simple consequence of the text entered being displayed by an HTML rendering engine: it removes a LOT of whitespace. If you want the whitespace to stay, you'll have to translate it yourself using PHP functions like nl2br.

http://php.net/nl2br

EDIT: I'm pretty sure <p /> (as mentioned by Colanth) is not a correct tag.
 
Back
Top