$value) { if($value=='') $value = ''; $tpl = str_replace("[{$key}]", ''.$value.'', $tpl); } $tpl = preg_replace("/\[([\w_]*)\]/", '', $tpl); // Enviamos correo como HTML $nom = isset($_POST['nombre']) ? $_POST['nombre'] : '-'; $tel = isset($_POST['telefono']) ? $_POST['telefono'] : '-'; $eml = isset($_POST['email']) ? $_POST['email'] : '-'; email('Estudio preliminar', $tpl, $nom, $tel, $eml); if(intval($_POST['revista'])==1) { include('wp-content/themes/clobe/include/MCAPI.class.php'); include('wp-content/themes/clobe/include/config.inc.php'); $api = new MCAPI($apikey); $res = $api->listSubscribe($listId, $_POST["email"],NULL,'html',false); } header('location: form-historia-clinica-respuesta.php'); } } ?>