<?php 
$co=$_POST['cod_entidad'];
$id=$_POST['idpersona'];
$ia=$_POST['idarea'];
$ic=$_POST['idcargo'];
$im=$_POST['idmotivor'];
$dat = array("cod_entidad"=>$co,"idpersona"=>$id,"idarea"=>$ia,"idcargo"=>$ic,"idmotivor"=>$im);
$str = http_build_query($dat);
$url = curl_init("http://softwaremelissa.com/core/registrarAgendadet.php");
curl_setopt($url,CURLOPT_POST,true);
curl_setopt($url,CURLOPT_POSTFIELDS,$str);
curl_setopt($url,CURLOPT_RETURNTRANSFER,true);
curl_exec($url);
curl_close($url);
