|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
shepR Smarty n00b
Joined: 25 May 2004 Posts: 4
|
Posted: Tue May 25, 2004 4:01 pm Post subject: problème de formulaire, variables $_POST |
|
|
bonjour je poste le premier topic en français pour un problème de transmission de variables entre un template et le fichier php.
Voilà mes fichiers :
-- index.tpl --
...
<form action="../index.php" method="post" name="rechercheAlbum" id="rechercheAlbum">
<input name="searchAlbum" type="text">
<input name="Rechercher" type="Submit" value="Rechercher">
</form>
...
--index.php --
...
if (isset($_POST['searchAlbum']))
{
$recherche=$_POST['searchAlbum'];
$smarty_page_accueil->assign("recherche",$recherche);
}
else{$smarty_page_accueil->assign("recherche","recherche inconnue");}
$smarty_page_accueil->display("index.tpl");//lance le template
...
je veux transmettre le champ de texte searchAlbum dans mon fichier index.php mais la variable n'est pas transmise. aidez moi svp !
Merci _________________ shepR |
|
Back to top |
|
atu Smarty Regular
Joined: 18 Apr 2003 Posts: 51 Location: Luxembourg
|
Posted: Wed May 26, 2004 2:58 pm Post subject: |
|
|
Code: |
<input name="searchAlbum" type="text" value="{$recherche|escape:"html"}">
|
|
|
Back to top |
|
|
|
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
|