try { $obj_trabajo->guardaAviso($_POST['i'], $id); } catch (Exception $e) { echo "Se ha producido un error : " . $e->getMessage(); } echo '<div class="alert alert-success alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <h4><i class="icon fa fa-info"></i>Aviso Guardado! </h4>Acabas de Guardar el aviso № ' . $idPublicacion . ' de forma exitosa!.</div>'; } else { echo '<div class="alert alert-danger alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <h4><i class="icon fa fa-ban"></i>Ya Guardado! </h4>El aviso № ' . $idPublicacion . ' lo habías guardado anteriormente.</div>'; } } $filas = ''; $resultado = $obj_trabajo->avisosGuardados($id); $cantidad = $resultado->num_rows; if ($cantidad > 0) { //IMPRIME INICIO_TABLA echo '<div class="box"> <div class="box-header"><h2><span class="fa fa-heart fa-fw text-red"></span> Mis Avisos Guardados</h2> <div class="content table-responsive table-full-width"> <table class="table table-hover table-striped"> <thead> <tr> <th>№</th><th>CARGO</th> <th>LUGAR DE TRABAJO</th> <th>CONTRATO</th> <th>JORNADA LABORAL</th> <th>DESCRIPCION</th> <th>FECHA PUBLICACIÓN</th> <th>ACCIONES</th> </tr> </thead> <tbody>'; //INICIO LLENAR TABLA while ($rows = $resultado->fetch_assoc()) { ?> <tr> <td><?php echo $rows['id']; ?> </td> <td><?php echo $rows['cargo']; ?>