How To Save CK Editor Data Into Database

The "CK Editor" is an HTML editor in which for saving the data into db we can use below function before saving it into DB in PHP language.

CK Editor - Education Funda

 

function dataready($data) {

        $data = trim($data);

        $data = stripslashes($data);

        $data = htmlspecialchars($data);

        return $data;

}

Before saving data we can call this function now:

dataready($_POST['input_name']); 

For for showing data into view pages we can use:

html_entity_decode($var_article_text);


Thanks for reading this blog I hope it will helpful for you.

Comments

Popular posts from this blog

JavaScript Logical Output Based Interview Questions

Create and Deploy AWS SAM Application

Deploy Angular Build With Express JS Project