Jump to content

Archived

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

Ninjakreborn

cms issue

Recommended Posts

I have constructed, a mini-cms, something small, for a small purpose.  I am databasing information, to redisplay on a page, but it is not preserving my line breaks for some reason if you put

[b]Privacy Policy[/b](header)
Hello.  What are you doing today.

Doing fine how are you
[end]

If you do that for instance, in the edit field, submit it to the database, and view it on the page it does

hello, what are you doing today.  doing fine how are you

It is not preserving the actual spaces, I can show code if you want but it's probably not valid for the purpose, this is more of a general question I would guess.

Share this post


Link to post
Share on other sites
I'm not too sure, but you would probably insert something into the code which replaced new lines with [code]<br />[/code].

Share this post


Link to post
Share on other sites
It's not that, this is the thing.

When I check the database.

it's not doing it either, it's running it all together when I looked at it, my first thought was nl2br, but when it databases it, it's databasing it, as it's running together.

Share this post


Link to post
Share on other sites
NO.
You don't want to store the br tags in the database

Read the FAQ.

Share this post


Link to post
Share on other sites
[quote author=Barand link=topic=110293.msg445631#msg445631 date=1159826644]
NO.
You don't want to store the br tags in the database

Read the FAQ.
[/quote]

Which FAQ? MySQL or PHP?

Share this post


Link to post
Share on other sites
I would think that if you did, then when it outputs back to the browser, it would just have a <br /> on the page to create another linebreak??

Share this post


Link to post
Share on other sites
php
http://www.phpfreaks.com/forums/index.php/topic,31047.msg111774.html#msg111774

Share this post


Link to post
Share on other sites

×

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.