Codeigniter Ajax Crud using DataTables - Insert / Add Data

Codeigniter Ajax Crud using DataTables - Insert / Add Data

Webslesson

7 лет назад

51,489 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

ABUL KALAM AMINUR ISLAM
ABUL KALAM AMINUR ISLAM - 24.08.2021 22:07

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

Ответить
Jorge
Jorge - 26.10.2020 04:13

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

Ответить
saurabh gawade
saurabh gawade - 24.06.2020 17:54

Undefined index: action Why ?
if($_POST["action"] == "Add"){
}
<input hidden type="text" name="action" id="action" value="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

<input type="hidden" name="action" id="action" value="Add" />
<input type="submit" name="action" id="action" value="Add" />

i also used both statements written above but still it is not working .

Ответить
suborto shuvo
suborto shuvo - 28.11.2019 09:55

sir, when i write
$_POST["action"] == "Add" this code in controller ,
for <input type="submit" name="action" class="btn btn-success" value="Add" /> this,
it will show me undefine index, when i have writter the exact same code of yours. whats the problem sir?

Ответить
Yathursan Vadivel
Yathursan Vadivel - 10.10.2019 20:11

if you get error change your code like this :

<div class="modal-footer">
<input type="hidden" name="action" class="btn btn-success" value="Add" />
<input type="submit" name="action" class="btn btn-success" value="Add" />
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>

Ответить
uday kumar
uday kumar - 04.10.2019 10:08

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

Ответить
Peternak Kode
Peternak Kode - 15.06.2019 17:37

That's great

Ответить
Anthony SOTO
Anthony SOTO - 02.03.2019 09:01

MUCHAS GRACIAS AMIGO

Ответить
Entertainment Media
Entertainment Media - 27.12.2018 10:14

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

Ответить
Rukh Kalar
Rukh Kalar - 27.12.2018 08:28

This code is not working

Ответить
JAC V
JAC V - 28.08.2018 17:32

Sir can you do codeigniter form_validation here? Thanks.

Ответить
JAC V
JAC V - 28.08.2018 17:32

Sir can you do codeigniter form_validation here? Thanks.

Ответить
Lanz Christian Buyao
Lanz Christian Buyao - 06.05.2018 08:30

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

Ответить
Nayan Shah
Nayan Shah - 16.04.2018 16:59

my button add doesn't work, please help.

Ответить
Ahmad Sukabul
Ahmad Sukabul - 31.03.2018 21:28

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

Ответить
Ahmad Sukabul
Ahmad Sukabul - 31.03.2018 20:49

my button add doesn't work, please help

Ответить
Franck Bokele
Franck Bokele - 02.03.2018 10:11

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??

Ответить
JC Castillo
JC Castillo - 27.10.2017 11:20

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

Ответить
Web Expert48
Web Expert48 - 20.10.2017 20:27

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 .

Ответить
raja kumar chikkala
raja kumar chikkala - 14.10.2017 16:29

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

Ответить
Joseph Omenda
Joseph Omenda - 14.09.2017 11:38

i cant be able to get my image preview

Ответить
zain qureshi
zain qureshi - 13.09.2017 18:08

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

Ответить
amine bensaadat
amine bensaadat - 24.07.2017 22:01

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

Ответить
Eric Paul Jaucian
Eric Paul Jaucian - 14.07.2017 09:58

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

Ответить
Shahadat Khan
Shahadat Khan - 05.06.2017 19:00

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 ...

Ответить
Harry Yadi
Harry Yadi - 19.05.2017 17:30

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

Ответить
Ramdane Ait Slimani
Ramdane Ait Slimani - 18.05.2017 15:58

Undefined index: action?

Ответить
Ulfah Choirun Nissa
Ulfah Choirun Nissa - 25.04.2017 06:08

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

Ответить
md rayhan mondol
md rayhan mondol - 14.04.2017 14:06

problem in Undefined index: action pls Reply

Ответить
Black Metal
Black Metal - 13.03.2017 23:18

Awesome !!
Ty !!

Ответить
Rahul
Rahul - 10.12.2016 18:07

you are great thank you 4 shearing your knowledge !!

Ответить
rohan dhiman
rohan dhiman - 09.12.2016 08:54

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

Ответить
Meng Trikea
Meng Trikea - 07.12.2016 18:55

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

Ответить