Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB