![]() |
Post is always empty on live server - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Post is always empty on live server (/showthread.php?tid=80332) |
Post is always empty on live server - SteeveDroz - 10-18-2021 Hello, I put up my website on the prod server and there way the following problem: When sending a form with method POST, nothing is received in the controller. Informations:
Thanks to whoever takes some time to answer! RE: Post is always empty on live server - InsiteFX - 10-19-2021 If you want help on this then you need to post your controller and html form code here for us to look at. RE: Post is always empty on live server - SteeveDroz - 10-19-2021 Here is my code: The HTML code: Code: <form method="post" class="table"> The controller (method User::login): PHP Code: public function login() RE: Post is always empty on live server - InsiteFX - 10-19-2021 Your missing the action attribute. PHP Code: <form action="/controller/method" method="post"> RE: Post is always empty on live server - SteeveDroz - 10-19-2021 Additional information: It seems that the response is sent twice, for example, if I contact the page with curl, I get 2 ci-session cookies. I know that has been talked about on this forum before, but I checked all the potential missing links, nothing seems wrong. (10-19-2021, 02:25 AM)InsiteFX Wrote: Your missing the action attribute. No, if action is missing, the PHP_SELF page is used. It can't be that because the page is correctly displayed after the form is sent. Other new information: Code: curl -i https://cramine.ch Code: curl -I https://cramine.ch RE: Post is always empty on live server - SteeveDroz - 10-19-2021 The response was indeed sent twice. I am using a composer package that didn't adapt to the latest versions of CodeIgniter. I notified the developper and manually edited vendor in the meantime. Thanks for all your help! |