Welcome Guest, Not a member yet? Register   Sign In
input post empty
#1

Hi guys,
i'm writing a backend in CI (frontend separated in html/js)
when i tried to send POST data to my controller $_POST is empty..
I've tried for few way but i always receive a empty array.
Maybe the problem could be about htaccess???

tried to call my API 
Code:
http://mysite.com/users/register_post_user
two vars
id=test
email=[email protected]
tried already to set url with or without  / at the end    

my controller - Users.php -
PHP Code:
public function register_post_user()
 
   {
        
print_r($_POST);

                
//few alternative i tried
        //echo $_POST['id']." ".$_POST['email'];  
        //$id = $this->input->post('id');
        //$email = $this->input->post('email');
        //echo $id." ".$email;
    

in that case the result is
Code:
Array ( )

i'm sending request by Postman and my frontend. the result doesn't change.
here my - .htacces - (modified only for removing index.php)

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
Reply


Messages In This Thread
input post empty - by Valerekk - 10-19-2017, 03:35 PM
RE: input post empty - by neuron - 10-19-2017, 11:21 PM
RE: input post empty - by Valerekk - 10-20-2017, 01:47 AM
RE: input post empty - by ponzo - 10-19-2017, 11:53 PM
RE: input post empty - by Valerekk - 10-20-2017, 01:49 AM
RE: input post empty - by Narf - 10-20-2017, 02:24 AM
RE: input post empty - by InsiteFX - 10-20-2017, 04:05 AM
RE: input post empty - by Valerekk - 10-20-2017, 04:53 AM
RE: input post empty - by ivantcholakov - 10-20-2017, 09:24 AM
RE: input post empty - by Valerekk - 10-21-2017, 01:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB