angularjs - how to send post data with http header in php? -


    private function reset_pwd_confirm(){         if($this->get_request_method() != "get"){             $this->response('',406);         }         $data = json_decode(file_get_contents("php://input"),true);         $verification_id = $this->_request['verification_id'];          $user_id = $this->_request['user_id'];          if(!empty($verification_id) && !empty($user_id) && $user_id > 0){             if(md5($user_id) == $verification_id){                                                        header("location: http://localhost:3000/#/reset?user_id=".$user_id);                 exit();                             }else{                 $success = array('status' => "failed", "msg" => "not confirmed.");                 $this->response($this->json($success),404);             }         }else{             $success = array('status' => "failed", "msg" => "invaild verification or user id.");             $this->response($this->json($success),404);         }      }         

i'm dealing restful apis ,the following apis used password reset confirmation, after confirmed api should redirect "location: http://localhost:3000/#/reset" {user_id:"5"} post method re-enter password , submit id.

how solve context? thanks.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -