when user register, i need to pass registration field value to other controller also. this other controller will send information to outside api as post to register other websites.
I try to redirect with data but i think i just totally lost. this is my second controller
public function registerUser()
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://api01.oriental-game.com:8085/register");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $this->xtoken);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(
"username" => "test2",
"country" => "Korea",
"fullname" => "Hihi User",
"language" => "kr",
"email" => "myuser123@test.com",
"birthdate" => "1992-02-18"
)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close($ch);
}
when user register to our site, it will automatically create account in our own site and other 2 websites through their register api.
thanks in advance for your help.