Título: Error de sintaxis en PHP :S
Publicado por: oscarj24 en 17 Junio 2010, 01:06 am
Hola, me aparecio este error en la linea 70 "unexpected T_ECHO" y no logro ubicarlo. Soy nuevo en PHP, espero su ayuda... muchas gracias ;D <?php if (isset($_POST['enviar'])){ $sql = "SELECT MAX(ID) FROM inscripciones"; $max_id = $row[0]+1; $nombres = trim($_POST['nombres']); $apellidos = trim($_POST['apellidos']); $DNI_CarneExtranjeria = trim($_POST['DNI_CarneExtranjeria']); $tipo_persona = trim($_POST['tipo_persona']); $empresa = trim($_POST['empresa']); $cargo = trim($_POST['cargo']); $direccion = trim($_POST['direccion']); $telefono_fijo = trim($_POST['telefono_fijo']); $telefono_celular = trim($_POST['telefono_celular']); $tipo_combrobante = trim($_POST['tipo_comprobante']); $razon_social = trim($_POST['razon_social']); $RUC=trim($_POST['RUC']); $_FILES['voucher']['name'] = $max_id."_".$_FILES['voucher']['name']; $upload_dir = '/home/name/public_html/inscripciones/vouchers/'; $extension = $_FILES['voucher']['type']; $mimetypes = array("image/jpeg", "image/gif", "image/png"); $size = $_FILES['voucher']['size']; $upload_file = $upload_dir.($_FILES['voucher']['name']); $voucher_nombre_db = $_FILES['voucher']['name']; echo '<html> <head> <title>Titulo Web</title> <META http-equiv="refresh" content="1; url=http://www.dominio.com/inscripciones/inscripcion.php"> </head> <body> <p>ERROR: Debe ingresar sus nombres.</p> </body> </html>'; elseif(isset($_POST['apellidos']) && strlen(trim($_POST['apellidos']))== 0) echo '<html> <head> <title>Titulo Web</title> <META http-equiv="refresh" content="1; url=http://www.dominio.com/inscripciones/inscripcion.php"> </head> <body> <p>ERROR: Debe ingresar sus apellidos.</p> </body> </html>'; elseif(isset($_POST['DNI_CarneExtranjeria']) && strlen(trim($_POST['DNI_CarneExtranjeria']))== 0) echo '<html> <head> <title>Titulo Web</title> <META http-equiv="refresh" content="1; url=http://www.dominio.com/inscripciones/inscripcion.php"> </head> <body> <p>ERROR: Debe ingresar su DNI o Carne de Extranjeria.</p> </body> </html>'; elseif((isset($_POST['tipo_persona'])== "Dependiente") && ((isset($_POST['empresa']) && strlen(trim($_POST['empresa']))== 0) || (isset($_POST['cargo']) && strlen(trim($_POST['cargo']))== 0) || (isset($_POST['direccion']) && strlen(trim($_POST['direccion']))== 0))) echo '<html> <head> <title>Titulo Web</title> <META http-equiv="refresh" content="1; url=http://www.dominio.com/inscripciones/inscripcion.php"> </head> <body> <p>ERROR: Debe completar los datos de persona dependiente.</p> </body> </html>'; elseif((isset($_POST['tipo_telefono'])== "Ambos" && ((isset($_POST['telefono_fijo']) && strlen(trim($_POST['telefono_fijo']))== 0) || (isset($_POST['telefono_celular']) && strlen(trim($_POST['telefono_celular']))== 0))) echo '<html> <head> <title>Titulo Web</title> <META http-equiv="refresh" content="1; url=http://www.dominio.com/inscripciones/inscripcion.php"> </head> <body> <p>ERROR: Debe ingresar sus numeros telefonicos.</p> </body> </html>'; elseif((isset($_POST['tipo_telefono'])== "Telf. Fijo" && (isset($_POST['telefono_fijo']) && strlen(trim($_POST['telefono_fijo']))== 0))) echo '<html> <head> <title>Titulo Web</title> <META http-equiv="refresh" content="1; url=http://www.dominio.com/inscripciones/inscripcion.php"> </head> <body> <p>ERROR: Debe ingresar el numero de telefono fijo.</p> </body> </html>'; elseif((isset($_POST['tipo_telefono'])== "Celular" && (isset($_POST['telefono_celular']) && strlen(trim($_POST['telefono_celular']))== 0))) echo '<html> <head> <title>Titulo Web</title> <META http-equiv="refresh" content="1; url=http://www.dominio.com/inscripciones/inscripcion.php"> </head> <body> <p>ERROR: Debe ingresar el numero de telefono celular.</p> </body> </html>'; elseif((isset($_POST['tipo_comprobante'])== "Factura") && ((isset($_POST['razon_social']) && strlen(trim($_POST['razon_social']))== 0) || (isset($_POST['RUC'])&& strlen(trim($_POST['RUC']))== 0))) echo '<html> <head> <title>Titulo Web</title> <META http-equiv="refresh" content="1; url=http://www.dominio.com/inscripciones/inscripcion.php"> </head> <body> <p>ERROR: Debe completar los datos del comprobante factura.</p> </body> </html>'; elseif((isset($_FILES['voucher']['name']) && strlen(trim($_POST['voucher']['name']))== 0) || (isset($_FILES['voucher']['type']) != ($mimetypes[0] || $mimetypes[1] || $mimetypes[2])) || (isset($_FILES['voucher']['size']) > 0 && isset($_FILES['voucher']['size']) <= 204800)) echo '<html> <head> <title>Titulo Web</title> <META http-equiv="refresh" content="1; url=http://www.dominio.com/inscripciones/inscripcion.php"> </head> <body> <p>ERROR: Debe adjuntar la imagen del voucher (Formatos permitidos: JPG, PNG, GIF / Tamaño Maximo: 200 KB).</p> </body> </html>'; else{ mysql_query("INSERT INTO inscripciones(Nombres,Apellidos,DNI_CarneExtranjeria,Tipo_Persona,Empresa,Cargo,Direccion,Telefono_Fijo,Telefono_Celular,Tipo_Comprobante,Razon_Social,RUC,Nombre_Voucher) VALUES('$nombres','$apellidos','$DNI_CarneExtranjeria','$tipo_persona','$empresa','$cargo','$direccion','$telefono_fijo','$telefono_celular','$tipo_comprobante','$razon_social','$RUC','$voucher_nombre_db')",$link); echo '<html> <head> <title>Titulo Web</title> <META http-equiv="refresh" content="2; url=http://www.dominio.com/inscripciones/inscripcion.php"> </head> <body> <p>Registro exitoso.</p> </body> </html>'; } } ?>
Título: Re: Error de sintaxis en PHP :S
Publicado por: Shell Root en 17 Junio 2010, 01:30 am
¬¬! y cual es la linea 70?
Título: Re: Error de sintaxis en PHP :S
Publicado por: Kasswed en 17 Junio 2010, 02:27 am
Te falta cerrar un paréntesis :¬¬
Saludos.
Título: Re: Error de sintaxis en PHP :S
Publicado por: oscarj24 en 17 Junio 2010, 04:49 am
hey, gracias me costo bastante encontrar el bendito parentesis un saludo!
|