Passing data from page to bootstrap modal using SQL & PHP

后端 未结 2 1153
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-28 07:11

So as per title, im trying to pass show multiple data from database using sql on the bootstrap modal. The ID will be pass down from the link, how is it done? been finding multip

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-28 07:41

    Write below line in your code:-

    $selrow=mysqli_fetch_assoc($sel_query);
    

    OR

    $selrow=mysqli_fetch_array($sel_query,MYSQLI_ASSOC);
    

    instead of

    $selrow=mysqli_fetch_array($sel_query);
    

    Also it is bad practice to write query directly into modal.

    You should use AJAX on click event. Also you should fill form data via jQuery OR javascript.

提交回复
热议问题