$rs = $paciente->paciente_nuevo($_REQUEST['fecha'], $_REQUEST['historia'], $_REQUEST['nombres'], $_REQUEST['apellidos'], $_REQUEST['fecha2'], $_REQUEST['estadocivil'], $_REQUEST['sexo'], $_REQUEST['departamento'], $_REQUEST['provincia'], $_REQUEST['direccion'], $_REQUEST['ocupacion'], $_REQUEST['telefono'], $_REQUEST['celular'], $_REQUEST['email'], $ruta, '0'); if ($rs) { if (!empty($HTTP_POST_FILES['userfile']['tmp_name'])) { if (move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], '../' . $ruta)) { echo "<center><h5>Se ha cargado con exito la foto.</h5></center>"; } } else { echo "<center><h5>No se ha seleccionado una foto. Puede adjuntarla mas adelnate editando al Paciente.</h5></center>"; // me da este error } } else { "no entro"; } } if (!isset($_REQUEST['historia'])) { $_REQUEST['historia'] = $paciente->devuelve_nrohistoria(); } if (!isset($_REQUEST['departamento'])) { $_REQUEST['departamento'] = '2'; $_REQUEST['provincia'] = '2'; } ?> <form enctype="multipart/form-data" name="form1" id="form1"> <table width="460" border="0" align="center" cellpadding="0"> <tr> <td colspan="3"> </td> </tr> <tr align="center"> <td colspan="3"><h5>AGREGAR NUEVO PACIENTE </h5></td>