Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] - Strange problem with POST data
#41

If your method name on Controller is both for get and post, then you should define them on your Route :

PHP Code:
$routes->match(['get''post'],'/signup''MySiteController::signup'); 
Reply
#42

Your code is correct
but why you can not receive post data?

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply
#43

GUYS!!!!!!

Pheraps the problem was in .htaccess.
I removed the file, put index.php in the url, and the post data are arrived!!!!

Now: In the config/app.php:
PHP Code:
public $baseURL 'http://192.168.10.200';
public 
$indexPage 'index.php'


Route.php:
PHP Code:
/**
 * --------------------------------------------------------------------
 * Route Definitions
 * --------------------------------------------------------------------
 */

// We get a performance increase by specifying the default
// route since we don't have to scan directories.
$routes->get('/''Home::index');                                     <-----ONLY THIS!!!
//$routes->match(['get', 'post'],'test/send', 'Test::send'); 
//$routes->get('test', 'Test::index', ['as' => 'test']);
//$routes->post('test/send', 'Test::send'); 
//$routes->post('test/send', 'App\Test::send'); 

.htaccess renamed to.htaccessXXX.
In this mode, now, it's work, but...... how i set my htaccess and remove the index.php in my url?
Reply
#44

Set public $indexPage = '';

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply
#45

NOW IT'S WORK!!!!!!!!!!!

In all my test, i don't remember that, in the new installation,  i not enable mod_rewrite apache!!!!!

i'll perform other tests now, but i think the problem is solved...

THANKS A LOT TO EVERYONE

HOW CAN I OFFER YOU A BEER FOR THE HELP YOU HAVE GIVEN ME?
Reply
#46

(This post was last modified: 09-29-2020, 11:35 AM by InsiteFX.)

Just contribute back to the CodeIgniter community, to help others.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB