• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pass parser class variables to php function.

#1
[eluser]adaxa[/eluser]
Hi everyone,
I have problem with parser class. What I have is a form with dropdown-list which I try to repopulate with last selected city on submit. For example I have this:

Code:
{cities_list}
  <option value="{city_id}" &lt;?php echo set_select('city', "{city_id}"); ?&gt;>{city_n}
{/cities_list}

But this doesn`t work

#2
[eluser]adaxa[/eluser]
*BUMP*

#3
[eluser]danmontgomery[/eluser]
You can't pass template variables into PHP code, you need to separate the two. I'd suggest you use form_dropdown() instead of trying to use set_select() with the template parser.

#4
[eluser]adaxa[/eluser]
Thanks


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.