Foros del Web » Programando para Internet » PHP »

Ayuda T_CONSTANT_ENCAPSED_STRING

Estas en el tema de Ayuda T_CONSTANT_ENCAPSED_STRING en el foro de PHP en Foros del Web. Ayudaaaa no encuentro el T_CONSTANT_ENCAPSED_STRING :( no encuentro donde se rompe la concatenacion :( me podeia hechar una mano?, me da el error en la ...
  #1 (permalink)  
Antiguo 15/07/2009, 07:05
 
Fecha de Ingreso: diciembre-2007
Mensajes: 149
Antigüedad: 16 años, 4 meses
Puntos: 1
Ayuda T_CONSTANT_ENCAPSED_STRING

Ayudaaaa no encuentro el T_CONSTANT_ENCAPSED_STRING :( no encuentro donde se rompe la concatenacion :( me podeia hechar una mano?, me da el error en la ultima linea del codigo que he pegao.

Código PHP:

                                        
switch($_SESSION['accion'])
                                        {
                                            case 
0// contrato cs
                                            
$sql "INSERT INTO `iuriscon_db`.`consulta_simple` (`id_consulta_simple` ,`fecha_consulta` ,`fecha_respuesta` ,
                                                                                                 `forma_pago` ,`importe_total` ,`asunto` ,`consulta` ,
                                                                                                 `url_adjunto` ,`id_tarifa_adjunto` ,`prev_respuesta` ,`completa_respuesta` ,
                                                                                                 `arch_adjunto` ,`estado`)
                                                    VALUES (NULL , '"
.$viejo."' , '".$anio_mas."' , 
                                                            '"
.$_SESSION['accion']."', '".$_SESSION['precio']."', '".$_SESSION['asunto_csp1']."', '".$_SESSION['consulta_csp1']."', 
                                                            '"
.URL_ADJ_CS.$_SESSION['email_csp2'].'_'.$_SESSION['adjuntar_arch_csp2']."', '".$_SESSION["id_tar_adj"]."','', '', 
                                                            '"
.$_SESSION['email_csp2'].'_'.$_SESSION['adjuntar_arch_csp2']."', '0')
                                                    "
;
                                            break;
                                            
                                            case 
1// contrato tu
                                            // PRIMERO DEBEMOS DARLO DE ALTA COMO CLIENTE 
                                                
$sql "INSERT INTO `iuriscon_db`.`cliente` (`id_cliente` ,`nombre` ,`dni` ,`apellidos` ,`direccion` ,
                                                                                             `email` ,`telefono` ,`provincia` ,`poblacion` ,`comentarios`)
                                                                                               VALUES (NULL , '"
.$_SESSION['nombre_tu']."' , '".$_SESSION['dni_tu']."' , '".$_SESSION['apellidos_tu']."' , '".$_SESSION['direccion_tu']."' , 
                                                                                             '"
.$_SESSION['email_tu']."', '".$_SESSION['telefono_tu']."' , '".$_SESSION['provincia_tu']."' , '".$_SESSION['poblacion_tu']."' , '".$_SESSION['comentario_tu']."')";
                                                                                             
                                                
$sessionOBJ->ejecuta_sql($sql); 
                                                
                                                
$conexion_rapida $sessionOBJ->crea_conexion(EW_CONN_HOST,EW_CONN_USER,EW_CONN_PASS,EW_CONN_DB);
                                                
$sql_id_cli 'SELECT id_cliente FROM cliente WHERE email = "'.$_SESSION['email_tu'].'"';
                                                
$id_cliente $sessionOBJ->ejecuta_sql($sql_id_cli);
                                                
                                                
$sql "INSERT INTO `iuriscon_db`.`tarifa_unica` (`id_tarifa_unica` ,`id_cliente` ,`forma_pago` ,`fecha_contratacion` ,`fecha_renovacion` ,
                                                                                                  `tiempo_aviso` ,`periodo` ,`creditos_disponibles` ,`estado`)
                                                        VALUES (NULL , '"
.$id_cliente[0]['id_cliente']."', '".$viejo."', '".$anio_mas."', 
                                                                '1', '0', '0', '0')    "
;
                                            break;
                                            
                                            case 
2;    // renovacion tu
                                            //RENOVACION
                                                
$sql "UPDATE `iuriscon_db`.`tarifa_unica` SET `fecha_renovacion` = '2010-06-18',`estado` = '2' WHERE `tarifa_unica`.`id_tarifa_unica` = 4 LIMIT 1";
                                            
//RE-CONTRATACION
                                            //$sql = "UPDATE `iuriscon_db`.`tarifa_unica` SET `fecha_renovacion` = '2010-06-18',`estado` = '2' WHERE `tarifa_unica`.`id_tarifa_unica` = 4 LIMIT 1";
                                            
break;
                                            
                                            case 
3;    // contrato servicio
                                                
$sql "INSERT INTO `iuriscon_db`.`servicio_puntual` (`id_servicio_puntual` ,`fecha_consulta` ,`fecha_respuesta` ,
                                                                                                      `forma_pago` ,`id_servicio` ,`asunto` ,`consulta` ,`url_adjunto` ,
                                                                                                      `completa_respuesta` ,`arch_adjunto` ,`estado`)
                                                        VALUES (NULL , '"
.$viejo."' , '".$anio_mas."' , 
                                                                '"
.$_SESSION['form_pago_csp2']."', '".$_SESSION['id_servicio']."', '".$_SESSION['asunto_csp1']."', '".$_SESSION['consulta_csp1']."', '".URL_ADJ_CS.$_SESSION['email_csp2'].'_'.$_SESSION['adjuntar_arch_csp2']."',  
                                                                '','"
.$_SESSION['email_csp2'].'_'.$_SESSION['adjuntar_arch_csp2']."', '0')";
                                            break;
                                        }
                                        
/* FIN INSERCCION BD */
                                    //    var_dump($consulta_op);
                                    //    var_dump($sql);
                                    
                                    
}
                                    
                                    
$Acabeimagenes = array('index_r9_c4.jpg','index_r9_c5.jpg','index_r9_c8.jpg',
                                               
'index_r10_c4.jpg','index_r10_c5.jpg','index_r10_c8.jpg',
                                               
'index_r11_c4.jpg','index_r11_c5.jpg','index_r11_c8.jpg');
                                                           
                                    
$sql_infobox 'SELECT titulo,contenido FROM seccion WHERE id_seccion = "'.$_GET['sec'].'"';
                                    
$Ainfobox $sessionOBJ->ejecuta_sql($sql_infobox);
                            
                                    
$infoboxOBJ->define_ancho('400px');
                                    
$infoboxOBJ->define_margen_lateral('0');
                                    
$infoboxOBJ->define_ruta_imagenes('partes_web/');
                                    
$infoboxOBJ->define_cabecera_imagenes($Acabeimagenes); 
  #2 (permalink)  
Antiguo 15/07/2009, 07:09
Avatar de jdelrioj  
Fecha de Ingreso: julio-2008
Ubicación: La Rambla , Córdoba -> Andalucía
Mensajes: 340
Antigüedad: 15 años, 9 meses
Puntos: 13
Respuesta: Ayuda T_CONSTANT_ENCAPSED_STRING

en el insert into del case 3 tienes esto
.$_SESSION['adjuntar_arch_csp2']."', '0')";
te falta a lo primero ' " .
  #3 (permalink)  
Antiguo 15/07/2009, 07:20
 
Fecha de Ingreso: diciembre-2007
Mensajes: 149
Antigüedad: 16 años, 4 meses
Puntos: 1
Respuesta: Ayuda T_CONSTANT_ENCAPSED_STRING

Es que se supone que eso está formando un valor para la base de datos que sea el email_nombrefichero ejemplo email@email_misfacturas.pdf
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:06.