title: Show Alert message and redirect after click Ok
body: <p>I am Using redirect function of Codeigniter with alert of JavaScript. I want to display message first before redirect to other page, but my code just directly redirect the page without displaying alert message. I need code in method of controller of codeigniter.I used code as follows in method of controller:</p>
  
  <pre><code>echo "&lt;script type='text/javascript'&gt;alert('Duplicate Users')&lt;/script&gt;";
  redirect('auth/login'),'location');
  </code></pre>
  
  <p>Plz Advice me
  Waiting for Response
  Thank You very Much for supporting me.</p>