Ver Mensaje Individual
  #6 (permalink)  
Antiguo 02/09/2005, 14:14
lotusxxl
 
Fecha de Ingreso: junio-2002
Mensajes: 243
Antigüedad: 21 años, 10 meses
Puntos: 1
Perdona se me olvidaba...

pero bueno el codigo es el mismo q se usa para las tablas...

Código PHP:
$html = new NokTemplate('../../../templates);
$html->cargar('
tBase','t_templatebase.html');
$html->cargar('
tLista','t_select.html');

$html->definirBloque('
tSelect', 'tLista');   
$html->definirBloque('
tOption'tLista'); 

$result mysql_query("SELECT id,valor FROM tabla1");
    
$html->asignar('sel_nom''lista');     
$html->asignar('Opcio1','-- Selecciona --');
    
while (
$row mysql_fetch_assoc($result)) 
{  
       
$html->asignar('Id'$row["id"]); 
    
$html->asignar('Val'$row["valor"]);      
    
$html->expandir('FILAS''+tOption);     


$html->expandir('
lista_principal', 'tSelect');    
$html->expandir('
FINAL', 'tBase');
$html->imprimir('
FINAL); 
Bueno creo q es todo lo q necesitas...

en el template base solo tienes q tener {lista_principal} para q te asigne el select a esa variable.

Salu2.