Re: Storing & Displaying problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ramesh Babu,

Storing:
When you go to store the content in the MySQL from FCKEditor then use the following in your insert/update query:
    htmlspecialchars(addslashes($_POST['<fckeditor field_name>']))

Retrieving:
When you go to retrieve the content from the MySQL and display that in the page then use the following:
    echo html_entity_decode(stripslashes($rows['<row_name>']));

You don't store the html tags in the MySQL editor as it is. So use the above ways for storing and retrieving. This is a good method. You won't get any problem while using these ways.

Bye.

 Thanks & Regards
Udayakumar Sarangapani
Sr. PHP Developer
CompIndia Infotech Pvt. Ltd.
Chennai.

"Science is nothing but logic..."




----- Original Message ----
From: Ramesh Babu <contactrameshbabu@xxxxxxxxx>
To: php-objects@xxxxxxxxxxxxxxx
Sent: Wednesday, 16 July, 2008 1:47:45 PM
Subject:  Storing & Displaying problem


Hi Dudes,

Am using FCKeditor & when i try to save the content into DB, the content is getting stored as 

&lt;p&gt;asdnmbsdfm nbsdnmbfsdnmbmns dbfmsdnbsdnmbsdf nmbsdfnm& lt;/p&gt;

am expecting that to get stored as <p>asdnmbsdfmnbsdnm bfsdnmbmnsdbfmsd nbsdnmbsdfnmbsdf nm</p>

how to solve this?

suppose if it cannot be solved, how to display while retrieving it from DB.

after retrieving & while displaying in a page its showing as <p>asdnmbsdfmnbsdnm bfsdnmbmnsdbfmsd nbsdnmbsdfnmbsdf nm</p>

and not as asdnmbsdfmnbsdnmbfs dnmbmnsdbfmsdnbs dnmbsdfnmbsdfnm

I tried with htmlspecialchars( ), but its not working. is there any other function available to convert?

Thanks in advance

Rgrds
Ramesh

____________ _________ _________ _________ _________ _________ _
Wish to Marry Now? Click Here to Register FREE
http://www.shaadi. com/registration /user/index. php?ptnr= mhottag

[Non-text portions of this message have been removed]

    


      Bring your gang together. Do your thing. Find your favourite Yahoo! group at http://in.promos.yahoo.com/groups/

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux