こちらは管理画面で、本番同期ボタンを押すと本番ディレクトリーのファイルに同期されるようになっています。
そこで、本番同期ボタンを押すと<Target=”_blank”>などは設定してないのに新しいウィンドウに飛んでしまいます。エラーはありません。
新しいウィンドウに飛ばないように本番同期されたときのメッセージを管理画面上に出したいです。どうすればできるのでしょうか?ご教授お願いいたします。
###ソースコードです
<form action="" method='post'> <table class="table table-bordered table-hover"> <thead> <tr> <th><input id="selectAllBoxes" type="checkbox"></th> <th>番号</th> <th>タイトル</th> <th>本文</th> <th>本番同期</th> </tr> </thead> <tbody> <?php $query = "SELECT * FROM test ORDER BY test_id DESC"; $sql = mysqli_query($con, $query); while($row = mysqli_fetch_assoc($sql)){ $test_id =$row['test_id']; $test_title = mb_substr($row['test_title'],0,15); $test_contents = mb_substr($row['test_contents'],0,15); echo "<tr>"; ?> <?php echo "<td>$test_id</td>"; echo "<td>$test_title</td>"; echo "<td>$test_contents</td>"; echo "<td><button class=\"btn\" onclick=\"window.open('includes/sync.php?test_id={$test_id}');\">本番同期</button></td>"; echo "</tr>"; } ?> </tbody> </table> </form>
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/05/12 04:34
退会済みユーザー
2016/05/12 04:36
2016/05/12 05:53
2016/05/12 07:00 編集
退会済みユーザー
2016/05/13 02:11
2016/05/16 05:07
2016/05/23 06:13
2016/05/23 09:33