Get-Gaming Posted March 24, 2016 Posted March 24, 2016 So we're able to retrieve and post custom fields now but i don't quite understand how i can do that. I only got as far as using the parameters. $curl = curl_init( $communityUrl . 'cms/records/2' ); curl_setopt_array( $curl, array( CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_HTTPAUTH => CURLAUTH_BASIC, CURLOPT_USERPWD => "{$apiKey}:", CURLOPT_POST => 1, CURLOPT_POSTFIELDS => "category=$insertcategory&hidden=0&title=$title&author=$this->memberid&fields[7]=$this->departure&fields[8]=$this->arrival&fields[18]=$this->income&fields[11]=$this->cargo&fields[9]=$distance&fields[10]=$consumed&fields[12]=$this->mass&fields[13]=$trailerDamage&fields[14]=$this->brand&fields[16]=$this->fromcompany&fields[17]=$this->tocompany&fields[15]=$this->model" ) ); curl_exec($curl); Left api and url out of it here. This works. But how could I also edit a member with this post? If not possible can I edit custom fields through a seperate curl then? If so how?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.