title: How to use confirm box in php codeigniter inside a function of a controller?
body: <pre><code>public function removeSelectedCategory()
        {
            echo "&lt;script&gt;var r=confirm('Are you sure you want to delete this category?');         &lt;/script&gt;";
  
            if($r==true)
            {
                some code goes here
            }
  </code></pre>
  
  <p>I have written something like this. Now I want to delete something but I want user to confirm it before deletion. This function is inside controller.</p>