last day (18 days later) » 

15:06
1
A: PHP bootstrap 4 modal delete button in each row

Ankur SharmaThat's because you are not passing the row id to the modal popup. Add the faculty id to your delete button and add a unique class to it 'delete-faculty-btn'. Ref. to below line <a type="button" data-fid="<?php echo $row->Faculty_ID;?>" title="Delete Faculty" data-toggle="modal" data-target="#d...

The data has been deleted.. but it the Undefined variable: id is still there..
Because you have not initialised the $id variable. if(isset($_POST['delete'])) { $id = $_POST['delete']; $data->delete_multiple($id, $conn); }
Also, now you can delete the line "$id = $_POST['delete'];" from your function delete_multiple
Thank you so much @Ankur Sharma
My Pleasure :-)
Hello @Ankur Sharma , my status active/deactive doesn't work anymore..
15:06
was it working previously? Any error you are getting? do you have another modal popup for them?
Yes the status active and deactive was working properly.. Can I share you my codes ?
@jerico yes, please..
can I have your email..
I send it.. as well the db.. facultyevaluation.sql
Do you have a facebook Ankur Sharma ?
15:15
yes, i do. Same email
Have not received it till now
I send it through facebook
I share it with My Drive
thank you Sharma...
15:36
I am not sure how your code was working previously
anyways please use the same approach
i ll send you updated files
When I added this modal footer
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
<input type="hidden" name="delete" value="" id="row-id-to-delete">
<button type="submit" class="btn btn-danger" >Yes</button>
</div>

and this function

$('.delete-faculty-btn').on('click',function(){
$("#row-id-to-delete").val($(this).data('fid'));


});
I already have this..
$('.activate').on('click',function(){
var id = $(this).data('id');
$('#activate').val(id);



});
try my old version of modal , the status works.. but can't delete data
<!-- The Modal -->
<div class="modal fade" id="delete_modal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title">Delete Confirmaiton</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<!-- Modal body -->
<div class="modal-body">
<div class="alert alert-danger" role="alert">
Are you sure you want to delete selected record?
</div>
</div>
<!-- Modal footer -->
<div class="modal-footer">
15:59
Ok, in your case, just change the line
if(isset($_POST['delete'])) {
to
if(!empty($_POST['delete'])) {
16:11
Wow, thank you so much.. Sharma! Godbless you..

  last day (18 days later) »