Ajax login form token Vs normal login - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7) +--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13) +--- Thread: Ajax login form token Vs normal login (/showthread.php?tid=71956) |
Ajax login form token Vs normal login - Pawan6161 - 10-17-2018 Hello skunkbad I need to ask you can we use ajax login and normal login together ?? why the form_open function create different name for token below is my code above is ajax and below is normal submit form Code: <form action="http://localhost/atio/auth/ajax_attempt_login" id="login-form" method="post" accept-charset="utf-8"> You can see both form have same name for token which is loginToken , But when i place the ajax form in different form it give me below output with token name token Code: <form action="http://localhost/atio/auth/ajax_attempt_login" id="login-form" method="post" accept-charset="utf-8"> I want to use external js for ajax submission instead of passing jquery code to view everytime. Why the From_token is empty.. PHP Code: string = Pawan6161 RE: Ajax login form token Vs normal login - skunkbad - 10-17-2018 Take a look at the ajax_login method of the Examples controller. It clearly shows how to do an Ajax login, and shows how to change the token name. RE: Ajax login form token Vs normal login - Pawan6161 - 10-18-2018 Its fixed i need to assign token name on every page from which i need ajax login $this->tokens->name = config_item('login_token_name'); |