Forums

PHP

This topic is locked

Text Properties when adding a new entry...

Posted 23 Nov 2001 19:31:00
1
has voted
23 Nov 2001 19:31:00 Oli Wilkinson posted:
I've managed to make a simple dynamic News Page using PhP and MySQL in Dreamweaver Ultra Dev (with the PHAkt extension).

All works great, and I've even made a webbased control panel (using forms) for people to add, update or delete News items over the web! This also works great.

However, when inserting the text for the news item - how do i keep the text "format"?

For example, entering this in my news form:

"This is a sample to show you what i mean.

If I do this it doesn't work!"

...ends up looking like this:

"This is a sample to show you what i mean.If I do this it doesn't work!"

How can I get round this?

Cheers

Oli

Replies

Replied 23 Nov 2001 23:22:18
23 Nov 2001 23:22:18 Tim Green replied:
There are some built-in tools, called Server Formats that help you with this. These are special formatting options, specifically for Dynamic elements that allow you to control formatting etc.

The Server Formats in the current PHAkT distribution comprise my contribution to PHAkT and are very easy to implement.

To use these commands when you drag your Database Column from the DataSources floater over to your page, the relevant column is highlighted in the DataSources floater when you select the element on the page.

If you now look to the right of the column in the DataSources floater you will see that there is a drop-down menu with plenty of options.

If you go to the Strings menu, Formatting and select 'Convert \n to < BR >' this will convert all newline characters stored in your database to the HTML < BR > tag, and therefore preserve your formatting.

Hope this helps <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 24 Nov 2001 11:15:56
24 Nov 2001 11:15:56 Oli Wilkinson replied:
Thanks for that! That was just the ticket <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Reply to this topic