How to get CKEditor value in Codeigniter?How can I prevent SQL injection in PHP?How should I choose an authentication library for CodeIgniter?How do I get PHP errors to display?How do I get a YouTube video thumbnail from the YouTube API?How to Sort Multi-dimensional Array by Value?How to get the client IP address in PHPHow do you parse and process HTML/XML in PHP?How do I check if a string contains a specific word?Get the full URL in PHPHow does PHP 'foreach' actually work?

How do I truncate a csv file?

What people are called "кабан" and why?

Accidentally cashed a check twice

What are the problems in teaching guitar via Skype?

Applicants clearly not having the skills they advertise

Why does my electric oven present the option of 40A and 50A breakers?

What caused the tendency for conservatives to not support climate change regulations?

Humans meet a distant alien species. How do they standardize? - Units of Measure

Orientable with respect to complex cobordism?

How much current can Baofeng UV-5R provide on +V pin?

Creating Fictional Slavic Place Names

Does a component pouch automatically contain components?

Why is Colorado so different politically from nearby states?

Why does the UK have more political parties than the US?

Is there any Biblical Basis for 400 years of silence between Old and New Testament?

The term for the person/group a political party aligns themselves with to appear concerned about the general public

What should I do about a religious player who refuses to accept the existence of multiple gods in D&D?

Explain Ant-Man's "not it" scene from Avengers: Endgame

The deliberate use of misleading terminology

Can you use a concentration spell while using Mantle of Majesty?

Strange math syntax in old basic listing

The most awesome army: 80 men left and 81 returned. Is it true?

Is there an evolutionary advantage to having two heads?

How do I set the Verbatim font (or the mono font) to bold by default?



How to get CKEditor value in Codeigniter?


How can I prevent SQL injection in PHP?How should I choose an authentication library for CodeIgniter?How do I get PHP errors to display?How do I get a YouTube video thumbnail from the YouTube API?How to Sort Multi-dimensional Array by Value?How to get the client IP address in PHPHow do you parse and process HTML/XML in PHP?How do I check if a string contains a specific word?Get the full URL in PHPHow does PHP 'foreach' actually work?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















I Want to receive the values from the CKEditor. I Have written this HTML code



<div class="col-md-12">
<div class="form-group">
<label for="Image" class="control-label">Item Description </label>
<textarea id="item_description" name="item_description" rows="10" cols="80" style="resize:none"></textarea>
</div>
<!-- /.form-group -->
</div>
<div class="col-md-2">
<input type="submit" name="submit" id="Add" value="Add Items" class="btn btn-success">
</div>


This is the JQuery Code to get the value of the CKEditor



$("#Add").on("click", function(e) 
e.preventDefault();
var item_description = CKEDITOR.instances["item_description"].getData();
var formData = new FormData($("#form1")[0]); //It automatically collects all fields from form
$.ajax(
url: "'.base_url().'Home/add_items",
type: "post",
data: formData,
success: function(output)
alert('Added'):


);
);


And this the Home controller but when I here access the item_description
value is empty.



<?php
class Home extends MY_Controller

public function add_items()

echo $title = $this->input->post('item_description');
//$this->show('admin/add_items.php');


?>









share|improve this question




























    2















    I Want to receive the values from the CKEditor. I Have written this HTML code



    <div class="col-md-12">
    <div class="form-group">
    <label for="Image" class="control-label">Item Description </label>
    <textarea id="item_description" name="item_description" rows="10" cols="80" style="resize:none"></textarea>
    </div>
    <!-- /.form-group -->
    </div>
    <div class="col-md-2">
    <input type="submit" name="submit" id="Add" value="Add Items" class="btn btn-success">
    </div>


    This is the JQuery Code to get the value of the CKEditor



    $("#Add").on("click", function(e) 
    e.preventDefault();
    var item_description = CKEDITOR.instances["item_description"].getData();
    var formData = new FormData($("#form1")[0]); //It automatically collects all fields from form
    $.ajax(
    url: "'.base_url().'Home/add_items",
    type: "post",
    data: formData,
    success: function(output)
    alert('Added'):


    );
    );


    And this the Home controller but when I here access the item_description
    value is empty.



    <?php
    class Home extends MY_Controller

    public function add_items()

    echo $title = $this->input->post('item_description');
    //$this->show('admin/add_items.php');


    ?>









    share|improve this question
























      2












      2








      2








      I Want to receive the values from the CKEditor. I Have written this HTML code



      <div class="col-md-12">
      <div class="form-group">
      <label for="Image" class="control-label">Item Description </label>
      <textarea id="item_description" name="item_description" rows="10" cols="80" style="resize:none"></textarea>
      </div>
      <!-- /.form-group -->
      </div>
      <div class="col-md-2">
      <input type="submit" name="submit" id="Add" value="Add Items" class="btn btn-success">
      </div>


      This is the JQuery Code to get the value of the CKEditor



      $("#Add").on("click", function(e) 
      e.preventDefault();
      var item_description = CKEDITOR.instances["item_description"].getData();
      var formData = new FormData($("#form1")[0]); //It automatically collects all fields from form
      $.ajax(
      url: "'.base_url().'Home/add_items",
      type: "post",
      data: formData,
      success: function(output)
      alert('Added'):


      );
      );


      And this the Home controller but when I here access the item_description
      value is empty.



      <?php
      class Home extends MY_Controller

      public function add_items()

      echo $title = $this->input->post('item_description');
      //$this->show('admin/add_items.php');


      ?>









      share|improve this question














      I Want to receive the values from the CKEditor. I Have written this HTML code



      <div class="col-md-12">
      <div class="form-group">
      <label for="Image" class="control-label">Item Description </label>
      <textarea id="item_description" name="item_description" rows="10" cols="80" style="resize:none"></textarea>
      </div>
      <!-- /.form-group -->
      </div>
      <div class="col-md-2">
      <input type="submit" name="submit" id="Add" value="Add Items" class="btn btn-success">
      </div>


      This is the JQuery Code to get the value of the CKEditor



      $("#Add").on("click", function(e) 
      e.preventDefault();
      var item_description = CKEDITOR.instances["item_description"].getData();
      var formData = new FormData($("#form1")[0]); //It automatically collects all fields from form
      $.ajax(
      url: "'.base_url().'Home/add_items",
      type: "post",
      data: formData,
      success: function(output)
      alert('Added'):


      );
      );


      And this the Home controller but when I here access the item_description
      value is empty.



      <?php
      class Home extends MY_Controller

      public function add_items()

      echo $title = $this->input->post('item_description');
      //$this->show('admin/add_items.php');


      ?>






      php codeigniter ckeditor






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 24 at 10:53









      Waqas AhmadWaqas Ahmad

      22813




      22813






















          1 Answer
          1






          active

          oldest

          votes


















          1














          Modify your javascript codes, like this :



          $("#Add").on("click", function(e) 
          e.preventDefault();
          var formData = new FormData($("#form1")[0]); //It automatically collects all fields from form
          formData.append('item_description', CKEDITOR.instances['item_description'].getData());
          $.ajax(
          url: "<?=base_url()?>Home/add_items",
          type: "post",
          data: formData,
          success: function(output)
          alert(output);


          );
          );





          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55323055%2fhow-to-get-ckeditor-value-in-codeigniter%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Modify your javascript codes, like this :



            $("#Add").on("click", function(e) 
            e.preventDefault();
            var formData = new FormData($("#form1")[0]); //It automatically collects all fields from form
            formData.append('item_description', CKEDITOR.instances['item_description'].getData());
            $.ajax(
            url: "<?=base_url()?>Home/add_items",
            type: "post",
            data: formData,
            success: function(output)
            alert(output);


            );
            );





            share|improve this answer



























              1














              Modify your javascript codes, like this :



              $("#Add").on("click", function(e) 
              e.preventDefault();
              var formData = new FormData($("#form1")[0]); //It automatically collects all fields from form
              formData.append('item_description', CKEDITOR.instances['item_description'].getData());
              $.ajax(
              url: "<?=base_url()?>Home/add_items",
              type: "post",
              data: formData,
              success: function(output)
              alert(output);


              );
              );





              share|improve this answer

























                1












                1








                1







                Modify your javascript codes, like this :



                $("#Add").on("click", function(e) 
                e.preventDefault();
                var formData = new FormData($("#form1")[0]); //It automatically collects all fields from form
                formData.append('item_description', CKEDITOR.instances['item_description'].getData());
                $.ajax(
                url: "<?=base_url()?>Home/add_items",
                type: "post",
                data: formData,
                success: function(output)
                alert(output);


                );
                );





                share|improve this answer













                Modify your javascript codes, like this :



                $("#Add").on("click", function(e) 
                e.preventDefault();
                var formData = new FormData($("#form1")[0]); //It automatically collects all fields from form
                formData.append('item_description', CKEDITOR.instances['item_description'].getData());
                $.ajax(
                url: "<?=base_url()?>Home/add_items",
                type: "post",
                data: formData,
                success: function(output)
                alert(output);


                );
                );






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 24 at 15:02







                user11188821




































                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55323055%2fhow-to-get-ckeditor-value-in-codeigniter%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript