AJAX HTML Javascript jQuery PHP Example MORE Videos New

How to send CKeditor data to PHP file using AJAX, jQuery


<!DOCTYPE html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.ckeditor.com/4.15.0/standard/ckeditor.js"></script>
    var Content = CKEDITOR.instances['Content'].getData();
url: "save.php",
type: "POST",
data: {
Content: Content
cache: false,
success: function(dataResult){
var dataResult = JSON.parse(dataResult);

$('#success').html('Data Saved successfully !');
else if(dataResult.statusCode==201){
  alert("Error occured !");

<textarea name="Content" id="Content" placeholder="Required, at least 4 characters"></textarea><br>
<button type="button" id="save">Save</button>


echo $_POST['Content'];


Warning: Undefined variable $article_id in /var/www/html/st/includes/get_article.php on line 9

Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6 in /var/www/html/st/includes/get_article.php:9 Stack trace: #0 /var/www/html/st/includes/get_article.php(9): mysqli_query() #1 /var/www/html/st/ajax/ajax-ckeditor.php(110): include('...') #2 {main} thrown in /var/www/html/st/includes/get_article.php on line 9