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:
echo "<script type='text/javascript'>alert('Duplicate Users')</script>";
redirect('auth/login'),'location');
Plz Advice me Waiting for Response Thank You very Much for supporting me.