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.
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
Post a Comment