Ver Mensaje Individual
  #7 (permalink)  
Antiguo 15/09/2012, 18:02
arlene90
 
Fecha de Ingreso: septiembre-2012
Mensajes: 103
Antigüedad: 11 años, 7 meses
Puntos: 0
Respuesta: Like en dreamweaver php

ahora lo hice asi y no los muestra pero ahora al digitar cualquier cosa se muestran nuevamente todos los registros de la tabla

Código PHP:
if(isset($_POST['consigla']) || isset($_POST['connombre'])){

 
$guardasigla $_POST['consigla'];
 
$guardanombre $_POST['connombre'];



mysql_select_db($database_prematricula$prematricula);
@
mysql_query("SET NAMES 'utf8'");
$query_Recordset1 "SELECT nucleos.id_nucleo, nucleos.sigla_nucleo, nucleos.nombre_nucleo, nucleos.descripcion_nucleo FROM nucleos WHERE sigla_nucleo LIKE  '%$guardasigla%'  OR nombre_nucleo LIKE '%$guardanombre%' ";
$Recordset1 mysql_query($query_Recordset1$prematricula) or die(mysql_error());
$Recordset2 mysql_query($query_Recordset1$prematricula) or die(mysql_error());

}

$id_nucleo=$row_Recordset1['id_nucleo'];

?> 


aca esta la otra parte

Código PHP:
<form action="<?php echo $editFormAction?>" method="post" name="form2" id="form2">
      <table align="center">
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Sigla:</td>
          <td><input name="consigla" type="text" id="consigla" value="" size="20" /></td>
          <td nowrap="nowrap" align="right">Nombre:</td>
          <td><input name="connombre" type="text" id="connombre" value="" size="20" /></td>
          
          <td><input type="submit" value="Consultar" /></td>
        </tr>
      </table>
     
  <?php
  
  
if(isset($_POST['consigla']) || isset($_POST['connombre'])){
      
     
$numfilas mysql_num_rows($Recordset2);
         
    echo 
'<table cellpadding="0" cellspacing="0" width="50%" >';
    echo 
'<thead><tr><td>No.</td><td>SIGLA</td><td>NOMBRE</td><td>DESCRIPCION</td></tr></thead>';
    echo 
"</table>";
?>        
<div id="adentro2">
<?php    
    
echo '<table cellpadding="0" cellspacing="0" width="50%">';
    for (
$i=0$i<$numfilas$i++)
    {
        
$fila mysql_fetch_array($Recordset1);
        
$numlista $i 1;
        
        echo 
'<tr><td>'.$numlista.'</td>';
        echo 
'<td>'.$fila['sigla_nucleo'].'</td>';
        echo 
'<td>'.$fila['nombre_nucleo'].'</td>';
        echo 
'<td>'.$fila['descripcion_nucleo'].'</td>';
        
        
        echo 
'<td><a href="Editarnucleo.php?id='.$fila['sigla_nucleo'].'">Ver</a></td></tr>';
    }
    echo 
"</table>";
  }
?>
</div>
        
    </form>
    </div>

no se si es que coloco mal los {}, disculpa la molestia