Re: fast template help

From: Date: Sat, 05 Oct 2002 03:25:15 +0000
Subject: Re: fast template help
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-27687@lists.php.net to get a copy of this message
{ROW} <---------------- te falta esto magoo (fijate que te falta algo mas) <!--START TEMPLATE LINEROW--> <tr> <td>{NOMBRE}</td> <td>{APELLIDO}</td> <td>{TELEFONO}</td> </tr> <!--END TEMPLATE LINEROW--> ----- Original Message ----- From: "Alan Lavintman" <alan11@fibertel.com.ar> To: <lista@phpes.com> Sent: Friday, October 04, 2002 5:35 PM Subject: [PHP-ES] fast template help este es mi php include "class.FastTemplate.php"; $con=mysql_connect("localhost","","") or die ("no se pudo conectar"); $sel=mysql_select_db("ascii",$con); $tpl=new FastTemplate("."); $templates["main"]="main.tpl#PAGE"; $templates["row"]="main.tpl#LINEROW"; $tpl->define($templates); $sql="select * from datos"; $query=mysql_query($sql); while(list(,$nombre,$apellido,$telefono)=mysql_fetch_row($query)) { $tpl->assign(NOMBRE,$nombre); $tpl->assign(APELLIDO,$apellido); $tpl->assign(TELEFONO,$telefono); $tpl->parse(ROW,".row"); <------------------ un punto ahi !!!! } $tpl->parse(MAIN,"main"); $tpl->FastPrint(MAIN); ?> este es mi template main.tpl <!--START TEMPLATE PAGE--> <html> <head><title></title> </head> <body> <!--START TEMPLATE LINEROW--> <tr> <td>{NOMBRE}</td> <td>{APELLIDO}</td> <td>{TELEFONO}</td> </tr> <!--END TEMPLATE LINEROW--> </body> </html> <!-- END TEMPLATE PAGE --> el error es el siguiente: ERROR: Nothing parsed, nothing printed alguna idea?? la base de datos esta llena. y nada se imprime. desde ya muchas gracias

« previous php.general.es (#27687) next »