My page is written like this:
The select here is just one of them, I have about 20 select controls
{#section name=one loop=11 start=10 step=-1#} {# $smarty. section.one.index#} {#/section#}
Now I need to save the submitted information in the background:
if (Is_array ($_post[' ZB ')) && count ($_post[' ZB ']) >0) {for ($i =0; $i
Strange things come, obviously I have 10 select control, but submitted to the background, only 4 valid, the remaining 6 are all empty values, what is going on?
Reply to discussion (solution)
Print_r ($_post[' ZB ');
Post the results
Post the HTML code to see, Print_r ($_post); See what the value is.
if (!empty ($_post[' ZB '] [$i]))
There's something wrong with your judgment here.
Executes if the value of the control is not 0 or null or empty
If the value is 0, it will not be executed.
This is the result, the first few are worth it, and there's nothing behind it.
Look at the option for select in the page there is no value
Thank you very much, originally was the front desk to write wrong.
{#section name=one loop=11 start=10 step=-1#} {# $smarty. section.one.index#} {#/section#}
The value in this is null