Handling Array field post data

前端 未结 1 690
不思量自难忘°
不思量自难忘° 2021-01-22 20:38

I searched all forum and couldn\'t find appropriate answer for my question, array post handling this is quite new to me. I have a html form which as array fields,



        
1条回答
  •  时光取名叫无心
    2021-01-22 21:08

    $title = $_POST['title'];
    $desc = $_POST['desc'];
    $cate = $_POST['cate'];
    for($i=1 ; $i < count($title) ; $i++)
    {
        INSERT INTO sometable(title,desc,cata)VALUES($title[$i],$desc[$i],$cate[$i]);
    }
    

    0 讨论(0)
提交回复
热议问题