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

(10-20-2017, 09:24 AM)ivantcholakov Wrote: js:
Code:
function sendLogin(id, email) {
  $.ajax({
      type: 'post',
      url: "http://www.plickapp.com/API/index.php/users/register_user/",
      data: {
          'idfb': id,
          'emailfb': email
      },
      success: function (result) {
           console.log("Ok " + result);
      },
      error: function (result) {
          console.log(result);
      }
 });
}

PHP:
Code:
public function register_post_user()
{
   ob_start();

   print_r($this->input->post());

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

   $output = ob_get_clean();
   $this->output->set_output($output);
}

It works!!! thank you! Big Grin
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