Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

passage de paramètre de template à php

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French
View previous topic :: View next topic  
Author Message
double
Smarty n00b


Joined: 11 May 2007
Posts: 1

PostPosted: Fri May 11, 2007 5:35 pm    Post subject: passage de paramètre de template à php Reply with quote

Bonjour,
je cherche à passer une valeur depuis un fichier tpl:
Code:

<a href='remarques.php?num={$Tab[idx].id}'>{$Tab[idx].prenom}</a>


Le lien me redirige bien vers remarques.php, et le navigateur affiche dans sa barre:
Quote:

../remarques.php?num=5

mais quand je fais : <?php $num ?> dans remarques.php, rien ne s'affiche, je suis bloqué, pouvez-vous m'aider?
Merci
Back to top
View user's profile Send private message
Nasga
Smarty n00b


Joined: 30 May 2007
Posts: 2

PostPosted: Thu May 31, 2007 10:56 am    Post subject: Reply with quote

C'est une variable passée en get, il faut donc la récuperer en get :

Code:
<?php
echo $_GET['num'];
?>

_________________
"Vi veri veniversum vivus vici."
Faust.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP