Codeigniter Ajax Crud using DataTables - Insert / Add Data

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 73

  • @entertainmentmedia8298
    @entertainmentmedia8298 5 лет назад +1

    Please make a tutorial for fetching data from database in datatables using ajax php codeigniter. thanks

  • @stuart14100
    @stuart14100 4 года назад

    Hi , is there any way that i can add a "add another one" button?

  • @subortoshuvo9717
    @subortoshuvo9717 5 лет назад

    sir, when i write
    $_POST["action"] == "Add" this code in controller ,
    for this,
    it will show me undefine index, when i have writter the exact same code of yours. whats the problem sir?

  • @ChandraTech52
    @ChandraTech52 8 лет назад

    you are great thank you 4 shearing your knowledge !!

  • @shahadatkhan8461
    @shahadatkhan8461 7 лет назад

    DataTables warning: table id=user_data - Ajax error.
    I try your source code and another way but, I can't solve this error! Please help me ...

  • @rajakumarchikkala8275
    @rajakumarchikkala8275 7 лет назад

    Hi, Thank you for your wonderful videos. I want to put where condition on my project in datatables. could you please suggest me.

  • @jccastillo1682
    @jccastillo1682 7 лет назад +1

    this is driving me crazy, somebody help me please, did everything in the video, in my controller it says undefined index "action" if i put it like in the video
    if($_POST["action"] == "Add"){
    }
    in the other hand if i put:
    if( $this->input->post("action") =="Add" ){
    }
    it doesn't retrieve data, nothing, a blank alert but doesn't insert nothing

    • @jccastillo1682
      @jccastillo1682 7 лет назад

      nevermind i did what u say and i put a hidden input thx a lot.
      also i have a question what is the purpose of the hidden input?

    • @ahajri89
      @ahajri89 7 лет назад

      remove the if statement

  • @yathursanvadivel5819
    @yathursanvadivel5819 5 лет назад +1

    if you get error change your code like this :



    Close

    • @SanthoshKumar-tb7zk
      @SanthoshKumar-tb7zk 4 года назад

      In update,
      I am not changing the image then click the add button.it is showing the error.
      Undefined offset:1

    • @SanthoshKumar-tb7zk
      @SanthoshKumar-tb7zk 4 года назад

      Undefined offset :1
      Controller/crud.php

  • @bokele
    @bokele 6 лет назад

    Hi, as some people already stated in the coments section, I am also facing the error
    - Undefined index: action
    if($_POST["action"] == "Add"){
    }
    to the first video of insert data why??

  • @anthonysoto8213
    @anthonysoto8213 5 лет назад

    MUCHAS GRACIAS AMIGO

  • @zainqureshi307
    @zainqureshi307 7 лет назад

    When i insert data then data is inserted successfully but page is not reload perfectly it show black window so please help me

  • @saurabhgawade6829
    @saurabhgawade6829 4 года назад

    Undefined index: action Why ?
    if($_POST["action"] == "Add"){
    }
    sir this line of code is not working,kindly provide me solution and i also checked in source code still it is not working
    i also used both statements written above but still it is not working .

  • @lanzchristianbuyao6948
    @lanzchristianbuyao6948 6 лет назад

    Hello. Image is not being uploaded to my directory nor is it found in my computer? What is the problem?

    • @rahmatfirman5765
      @rahmatfirman5765 6 лет назад

      do you following the previous tutorial that explain how to upload image using ajax ?

  • @mengtrikea2216
    @mengtrikea2216 8 лет назад

    Hi Webslesson could you show me how to update image in codeigniter with more fileinput

    • @webslesson
      @webslesson  8 лет назад +1

      In next we have covered this topic, please wait for next video. Thanks...

    • @mengtrikea2216
      @mengtrikea2216 8 лет назад

      Thank webslesson could you advice me how to be codeigniter coding skill?

  • @blackmetal1131
    @blackmetal1131 7 лет назад

    Awesome !!
    Ty !!

  • @jacv7870
    @jacv7870 6 лет назад

    Sir can you do codeigniter form_validation here? Thanks.

  • @PeternakKode
    @PeternakKode 5 лет назад

    That's great

  • @udaykumar-wb8cj
    @udaykumar-wb8cj 5 лет назад

    i am getting error like Undefined index:action filenmae:controllers/crud.php how can in overcome this error please helpme

  • @CrazyForModelKit
    @CrazyForModelKit 7 лет назад

    Hi! My code doesn't show any errors and it doesn't insert either. could you help me?

    • @webslesson
      @webslesson  7 лет назад

      Hi Eric Jaucian, Have you follow source code link which we have provide at description, please compare your code with that source code.

    • @CrazyForModelKit
      @CrazyForModelKit 7 лет назад

      I did exactly that. im still getting a error. when i check the console its the ajax method url. its not loading the user/user_action

    • @TRlakshan
      @TRlakshan 7 лет назад

      yes i have the same problem

    • @TRlakshan
      @TRlakshan 7 лет назад

      it happens because Crud controller function user_action(),
      didn't go inside if($_POST["action"] == "Add")
      i think view didn't pass 'action' value to controller.i don't know how to correct

    • @jccastillo1682
      @jccastillo1682 7 лет назад +3

      just put a hidden input in ur view like this:

  • @webexpert4816
    @webexpert4816 7 лет назад

    My form and listing(view all fetched data) page is in same page so i want my page's content reload once new data insert to database by submitting form . So what i use for that ? - Your used : dataTable.ajax.reload();
    Thanks in advance .

    • @webslesson
      @webslesson  7 лет назад

      It is very easy, if you want to reload whole your page, so you can use simple javascript like - Location.reload()

  • @ramdaneaitslimani1187
    @ramdaneaitslimani1187 7 лет назад

    Undefined index: action?

  • @pharyyady
    @pharyyady 7 лет назад

    Undedined index : Value.... Why????? Please

  • @slimefunoriginal
    @slimefunoriginal 6 лет назад

    where code to show modal when i tried to click add button?

    • @nolialbay8748
      @nolialbay8748 6 лет назад

      Hello FreeBird, as I encountered the same problem with you, you should try to include this link after dataTable.bootstrap.min.css because this work on me.

  • @josephomenda7928
    @josephomenda7928 7 лет назад

    i cant be able to get my image preview

    • @webslesson
      @webslesson  7 лет назад

      Hi Joseph Omenda, have you check source code of this video tutorial. After this you have not solve your problem, please share your code here.

  • @rukhkalar304
    @rukhkalar304 5 лет назад

    This code is not working

  • @slimefunoriginal
    @slimefunoriginal 6 лет назад

    my button add doesn't work, please help

  • @mdrayhanmondol1851
    @mdrayhanmondol1851 7 лет назад

    problem in Undefined index: action pls Reply

    • @webslesson
      @webslesson  7 лет назад

      Hi have you write submit button value is equal to Add, if you have write some other value, so please change to "Add"

    • @nolialbay8748
      @nolialbay8748 6 лет назад +1

      You should try inserting this line of code below your cancel and submit button. This works on me.

    • @azmathullah5427
      @azmathullah5427 6 лет назад

      tnx

  • @rohandhiman5620
    @rohandhiman5620 8 лет назад

    h!!! sir do you know laravel framework if you know plz make some tutorials with ajax laravel framework

    • @webslesson
      @webslesson  8 лет назад +1

      Thanks.. I will also make this type of tutorial in a very short time...

  • @ulfahchoirunnissa8356
    @ulfahchoirunnissa8356 7 лет назад

    Undefined index: action Why ?
    if($_POST["action"] == "Add"){
    }

    • @webslesson
      @webslesson  7 лет назад +1

      Hi Ulfah have you seen source of this video, in that we have share complete source code. And this is the hidden field whose value is "Add", if value of that hidden action is equal to "Add" then it will execute if block. Please check source of this video you can find solution.

    • @pharyyady
      @pharyyady 7 лет назад +3

      but still error

  • @abulkalamaminurislam6992
    @abulkalamaminurislam6992 3 года назад

    u are time west material..........

  • @jacv7870
    @jacv7870 6 лет назад

    Sir can you do codeigniter form_validation here? Thanks.

  • @nayanshah5916
    @nayanshah5916 6 лет назад

    my button add doesn't work, please help.

  • @aminebensaadat
    @aminebensaadat 7 лет назад

    Undefined index: action Why ?
    if($_POST["action"] == "Add"){
    }

    • @webslesson
      @webslesson  7 лет назад +1

      Hi have you seen source code of this video, this action is a hidden field in which we have define different operation like, if we want to insert some data then this field value will be 'Add' and if we want to update of edit some data then this field value will be change to 'Edit', so gone through source code.

    • @aminebensaadat
      @aminebensaadat 7 лет назад

      thank you it's work now the probleme is i nead hidden field like
      now i change my coode like this :

      Close
      thank you so much

    • @abhips5161
      @abhips5161 7 лет назад

      thank you sir