PHP HTTP Post to REST Service not updating database

valarrywz

New Member
I have this curl request below, which was successfully troubleshooted in another post. Right now, my PHP seems to work through this code without any errors, moves onto the next part of the IF statement and sends the confirmation email. It just doesn't update the database as it should from the web service. I will have to email the creator of the web service if this does not work but I just want to be sure that the code is fairly solid before I do this. Any one have any ideas? Here is the code:\[code\]$url = 'http://127.0.0.1:85/AccountCreator.ashx';$curl_post_data = http://stackoverflow.com/questions/3804194/array('companyName' =>urlencode($companyName), 'mainContact' =>urlencode($mainContact), 'telephone1' =>urlencode($telephone1), 'email' => urlencode($email), 'contact2' => urlencode($contact2), 'telephone2' => urlencode($telephone2), 'email2' => urlencode($email2), 'package' => urlencode($package) );foreach($curl_post_data as $key=>$value) {$fields_string .=$key. '=' .$value.'&';}rtrim($fields_string, '&');//die("Test: ".$fields_string);$ch = curl_init();curl_setopt ($ch, CURLOPT, $url);curl_setopt ($ch, CURLOPT_POST, count($curl_post_data));curl_setopt ($ch, CURLOPT_POSTFIELDS, $fields_string);$result = curl_exec($ch);curl_close($ch);\[/code\]
 
Back
Top