Handling Array field post data

前端 未结 1 687
不思量自难忘°
不思量自难忘° 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)
提交回复
热议问题