0

Can i disable a picture in bootstrap-carousel using a button? the picture i am using for slideshow is from the database. Can you help me to solve this problem. this is my code.

     while($row =enter code here mysqli_fetch_array($result))
  {
   $output .= '
   <tr>
   <td>'.$row["id"].'</td>
   <td>'.$row["file_name"].'</td>
   <td>
   <img src="data:image/jpeg;base64,'.base64_encode($row['name'] ).'" height="60" width="75" class="img-thumbnail" />
   </td>
   <td><button type="button" name="update" class="btn btn-info bt-xs update" id="'.$row["id"].'">UPDATE</button></td>
//the disable button
   <td><input type="button" class="btn btn-success" value="DISABLE" id="'.$row["id"].'"></input></td>
   <td><button type="button" name="delete" class="btn btn-danger bt-xs delete" id="'.$row["id"].'">DELETE</button></td>
   </tr>
   ';
 }
 $output .= '</table>';
 echo $output;
}
  • Welcome to StackOverflow. You are currently simply expecting us to solve the problem **for you**. **PLEASE** Give it a try **on your own**, and then show us what you came up with - and if you get stuck along the way, feel free to come back and ask for help. – Hearen Jul 11 '18 at 02:54
  • i tried this javascript to change the value of the button from "disable" to "enable" thankfully it works! but it works only on the first button not on the second and the exceeding button – Timothy Victore Jul 11 '18 at 08:14
  • Would you please add more details? The data and related code to make a minimal executable demo? – Hearen Jul 11 '18 at 09:02

0 Answers0