how can i show things under html tags coming from database ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
djdon11
Forum Commoner
Posts: 90
Joined: Wed Jun 20, 2007 5:03 pm

how can i show things under html tags coming from database ?

Post by djdon11 »

Hello everyone...

i am using FCK editor on my website , in which user can write , insert smiley's and can use anchor,links.. & all this data goes into the database in the form of html tags like this - >

Code: Select all

hello this is testing of FCK editor
src="/FCKeditor/editor/images/smiley/msn/regular_s
mile.gif" alt="" />
href="http://signsofgreatness.com">signsofgreatnes
s.com hello
everyone
but when i displayed this data on to the page than again it comes as it is but i need all the visual things instead of these tags ... means smiley , links anchor ,color's

can anybody help me that how to convert this html tags into their means ......

Thanks
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

As you see from the markup some things have been stripped away.

How are you inserting the html into the database?
djdon11
Forum Commoner
Posts: 90
Joined: Wed Jun 20, 2007 5:03 pm

in this way ..

Post by djdon11 »

hi sir thanks for reply ..

for inserting this things into database i just use the code written below

Code: Select all

$sValue = stripslashes( $_POST['FCKeditor1'] ) ;
$sValue=str_replace("'","´",$sValue);
$than this $sValue inserted into the database ......
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

At some point, you are losing the start of your tags... Look at other things happening to that value. Try echoing it at different points in the code to find out where the change occurs.
Post Reply