<a href="mb_modify.php?mb_id=<?php echo $row_RS_mb['mb_id']; ?>">修改</a> <a href="javascript: if( confirm('刪除後不能復原喔~~~\n\n確定刪除嗎?') ){ window.location.href = 'mb_delete.php?mb_id=<?php echo $row_RS_mb['mb_id']; ?>'; }">刪除</a>
<?php require_once('../shared/conn.php'); $mb_id = -1; if( isset($_GET['mb_id']) ){ $mb_id = $_GET['mb_id']; } $sql_str = "DELETE FROM mb WHERE mb_id = $mb_id"; $result = mysqli_query($conn, $sql_str); header('Location:mb_index.php'); ?>