I have saved some HTML data in mysql using php 64base_encode function
$title = $_POST['title'];
$content = base64_encode($_POST['content']);
$sqlTestimonail = "INSERT INTO staticpages (title, content) VALUES ('" . $title . "', '" . $content . "')";
//above code is stroing values in mysql
but when i fetch this and want to show this as HTML it will print it like string instead of rendering it as HTML I am using 64base_decode function to show below is my code
<main class="ps-main">
<div class="ps-banner">
<?php include('includes/slider.php'); ?>
</div>
</div>
<!----here we cut banner html and show this in static page -->
<?php
$printContent = "banner";
$sql_static_banner = "select * from staticpages where title='" . $printContent . "'";
$query_static_banner = mysqli_query($con, $sql_static_banner);
if (mysqli_num_rows($query_static_banner) > 0) {
$print_static_banner = mysqli_fetch_array($query_static_banner);
echo base64_decode($print_static_banner['content']);
}
?>
<div class="ps-section--features-product ps-section masonry-root pt-40 pb-80"></div>
if i view page source than echoed variable data show like this
<div> <div class="ps-section masonry-root pt-80 pb-40"></div><div>