Codeigniter 4 Post Problem |
I started use codeigniter 4 so new. Everything work properly on localhost but after insatalling on a host only "post" request not working. I cant get any valu after post request.
Html Code: <form action="<?php echo base_url()."/slider/ekle" ?>" method="POST" enctype="multipart/form-data" > Code: public function ekle() What i mean is everycodes are well working on "localhost" but "post" request not working on my host
After Code: print_r($baslik); die(); What could be the problem's sourche?
Did you place the ending slash / on your app/Config/App.php base_url ?
PHP Code: <form action="<?php echo base_url('Controller/Method'); ?>" method="POST" enctype="multipart/form-data" > Not sure why you would have the controller and method using the same name? You may also need to use all lowercase for the file names, depending on the server. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(10-15-2020, 11:15 PM)InsiteFX Wrote: Did you place the ending slash / on your app/Config/App.php base_url ? My condtroller is slider and method is ekle!!! and basrUrl is http://www.catidekorasyon.com/panel
(10-15-2020, 11:15 PM)InsiteFX Wrote: You may also need to use all lowercase for the file names, depending on the server. No. The file and the class name must start with a capital letter. See the doc: https://codeigniter4.github.io/userguide...ello-world Quote:The file must be called ‘Helloworld.php’, with a capital ‘H’. (10-15-2020, 11:15 PM)InsiteFX Wrote: This depend on how the routes are defined. If auto routing is turned off this won't work either. PHP Code: $routes->setAutoRoute(false); https://codeigniter4.github.io/userguide...uting.html
Then your form open would be like this.
PHP Code: // So if your controller is Slider and your method is ekle it would be like this/ What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(10-16-2020, 01:07 PM)InsiteFX Wrote: Then your form open would be like this. There’s no way to know for sure until we see how the routes are configured.
In your last lines in the controller, replace these lines
print_r($baslik); die(); with echo print_r($baslik, true); |
Welcome Guest, Not a member yet? Register Sign In |