0

I don't know how to embed bootstrap confirm delete code inside anchor code of CodeIgniter.

foreach($books as $row)
{
    //Add each result row into table
    $this->table->add_row(
        $row['fname'],
        $row['email'],
        $row['pass'],
        $row['image'],
        anchor('welcome/remove_rcrd/'.$row['id'], 'delete'),
        anchor('welcome/edit/'.$row['id'], 'Edit'));
}

I want to add bootstrap confirmation box when I click delete anchor or link

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
user3420561
  • 188
  • 1
  • 2
  • 20
  • I think this will help [http://stackoverflow.com/questions/22636819/confirm-delete-using-bootstrap-3-modal-box] – Raj Jan 31 '15 at 10:53

1 Answers1

0

I think this might help you

<?php $onclick = array('onclick'=>"return confirm('Are you sure?')");?>
<?=anchor("welcome/delete/$row->id","Delete", $onclick);?>
Yubraj Pokharel
  • 477
  • 8
  • 23