Jump to content

Afficher le résultat d’une requête à partir d’un fichier tpl


Recommended Posts

Bonjour,

Je voudrai savoir comment afficher le résultat d’une requête « exécuté dans une page resultat.php » à partir d’une d’un fichier « afficher.tpl »

Je ne voudrai pas utiliser echo ; donc y-aurait-il un moyen d’envoyer le résultat au fichier tpl ??

Merci pour votre aide.

Link to comment
Share on other sites

soit ça ne fonctionne pas, soit j'ai j'ai une erreur quelque part :

Fichier.php

global $cookie;
$usernum=$cookie->id_customer;
$result = mysql_query("SELECT Sol FROM ps_DB1customer WHERE id_customer='".$usernum."'");
$var=mysql_result($result,0);
setCookie("solcookie",$var);

 

Fichier.tpl

 

<p id="header_user_info"><br>
 <br>{l s='My Banque :' mod='blockuserinfo'}
 {if $cookie->isLogged()}
 <!--  afficher le contenu de la variable  -->
   <span>{$COOKIE['solcookie']} </span>
 {/if}
</p>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...