简体   繁体   English

分配结果 <select>在Smarty变量中

[英]Assign result of <select> in Smarty variable

I have a list field: 我有一个列表字段:

<select name="choix_magasin" id="choixmag">
  <option value="0" selected>--</option>
   {foreach $stores as $store}
  <option value="{$store.id_store}">{$store.city}</option>
   {/foreach}
</select>

I want to assign the result of this list in a smarty variable and I want to use my variable in any PHP files of my website. 我想在一个聪明的变量中分配该列表的结果,并且想在我网站的任何PHP文件中使用该变量。 How is it possible ? 这怎么可能 ?

You can then store the result in the Cookie, and you have it on all the site. 然后,您可以将结果存储在Cookie中,并将其保存在所有站点上。

Regards, 问候,

Arthur 亚瑟

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM