Welcome Guest, Not a member yet? Register   Sign In
how to use form_validation validation post data

post data to CI url,the post function below.
I sure url receive post data(log to file),but use form_validation validation args is invalid
PHP Code:
   private function http_post_data($url$data_string$authorization null) {

       $_ch curl_init();
       curl_setopt($_chCURLOPT_HTTPHEADER, array(
           'Content-Type: application/json; charset=utf-8',
           'Content-Length: ' strlen($data_string),
           'Authorization:' $authorization
       $return_content ob_get_contents();


       return $return_content;

   public function post($url$data) {
       $_data_string json_encode($data);
       $_ret $this->http_post_data($url$_data_string);

       return json_decode($_ret);

It seems you are calling a function, with a url and some data, posting it somewhere and collecting the results, then returning the results. Where exactly is the form validation that is failing?

Theme © iAndrew 2016 - Forum software by © MyBB