My page is written as follows:
Here, select is only 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
The strange thing is that I have 10 select controls, but only 4 controls are valid when submitted to the backend. The remaining six are all null values. what is going on?
Reply to discussion (solution)
Print_r ($ _ POST ['zb']);
Post result
Paste the HTML code to see the value of print_r ($ _ POST.
if (!empty($_POST['zb'][$i]))
Your judgment is incorrect.
If the control value is not 0, Null, or Null
If the value is 0, it will not be executed.
This is the result. there are values in the first few, and there will be no values in the latter.
Check whether the select option has a value.
Thank you very much for writing the error at the front desk.
{#section name=one loop=11 start=10 step=-1#} {#$smarty.section.one.index#} {#/section#}
The value here is a null value.