how to get post from same name textboxes in php

后端 未结 3 1805
半阙折子戏
半阙折子戏 2021-01-26 06:25

I have a form with multiple textboxes which are created dynamically, now all these textboxes are of same name lets say txt, now is there any way that when form proc

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-26 07:10

    Create your text box with names txt[]

    
    

    And in PHP read them as

    $alTxt= $_POST['txt'];
    $N = count($alTxt);
        for($i=0; $i < $N; $i++)
        {
          echo($alTxt[$i]);
        }
    

提交回复
热议问题