error on function call - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: error on function call (/showthread.php?tid=79097) |
error on function call - richb201 - 04-19-2021 I am seeing something strange here (or perhaps I am having a senior moment?) For some reason my call to passwordless_login_admin($email,$id); is coming up with the error below. Can someone tell me what is going on? PHP Code: Type: Error PHP Code: if ( ! defined('BASEPATH')) exit('No direct script access allowed'); RE: error on function call - richb201 - 04-19-2021 I moved my form from the template to a view.I still have the same issue. <form action="<?= base_url('/index.php/Users_start_login/get_email') ?>" method="POST"> <div class="field"> <label class="label">Email Address</label> <div class="control"> <input id="email" name="email" class="input" type="email" placeholder="Type the email address"> </div> </div> <div class="field is-grouped"> <div class="control"> <button class="button is-link">Enter system</button> </div> </div> </form> I get to the method, get_email, through the form action. Then everything goes crazy. RE: error on function call - vitnibel - 04-19-2021 Hi you just missed $this-> PHP Code: $this->passwordless_login_admin($email,$id); RE: error on function call - richb201 - 04-19-2021 (04-19-2021, 06:51 PM)vitnibel Wrote: HiThank you!. RE: error on function call - vitnibel - 04-19-2021 I don't know why the debugger goes to this place. But using values from $_POST is better through $request->getPost() is for sure RE: error on function call - richb201 - 04-19-2021 Thanks. I switched over to $email = $this->input->post('email'); and it still jumps to that same line in Codeigniter.php. strange. * ------------------------------------------------------ * Call the requested method * ------------------------------------------------------ */ call_user_func_array(array(&$CI, $method), $params); // Mark a benchmark end point $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_end'); <<this line /* Thanks. Seems like a phpStorm issue. I switched on "waiting for debug connection" in the debugger, and the problem went away! RE: error on function call - InsiteFX - 04-20-2021 This is telling me that your base_url is not configured right. PHP Code: <form action="<?= base_url('/index.php/Users_start_login/get_email') ?>" method="POST"> If you set your base_url to have an ending / slash like the documentation says to do you would not need a slash at the beginning of index,php. Also if you need index.php then you should have used site_url not base_url. RE: error on function call - hamishheney5 - 06-09-2021 I think you needed $this-> function on the last part of the code. RE: error on function call - ashwinjio - 02-25-2022 I am having the same issue. I try to move the form from the template to view but still same error. jiofi.local.html RE: error on function call - dervisvid - 04-12-2022 i also think using values from $_POST is better than $request->getPost() vidmate 2019 insta downloader |