How to delete data from database by using radio button in php?

后端 未结 3 947
迷失自我
迷失自我 2021-01-28 05:17

Actually here is the main problem. It does not get the value of \"$radio[$i]\" statement that can be used as a condition here. So will anyone please tell me what I have to write

3条回答
  •  青春惊慌失措
    2021-01-28 06:07

    Try this

    if(isset($_POST['delete']))
    {
        for($i=0;$i<$count;$i++)
        {
            $del_id = $radio['checked'];
            $sql = "DELETE FROM reigster WHERE id='".mysql_real_escape_string($del_id)."'";
            $result = mysql_query($sql);
        }
        if($result)
        {
            echo "

提交回复
热议问题