-1
我在這裏有我的用戶職位的div。我想添加喜歡和刪除按鈕。但按鈕只能在上面或最新的帖子上工作,其餘的按鈕不起作用。我嘗試了onclick函數,或在php(isset
)中獲取它,但沒有任何工作。在網絡中循環一個按鈕
<div class="container img-rounded" id="posted">
<FORM role="form" action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
<?php
$connection=MYSQLI_CONNECT('localhost',$user,$password);
MYSQLI_SELECT_DB($connection,$database);
$result=mysqli_query($connection,"SELECT * FROM post WHERE User_No = 'CTADMIN17' ORDER BY Post_Date DESC");
while($row = mysqli_fetch_assoc($result)){
?>
<div class="img-rounded postable" id="postable">
<div id='postdesc'>
<?php echo $row['Post_Desc'] ?>
</div>
<div id='likes'>
<button type='button' class='btn unlike btn-sm'> <span class='glyphicon glyphicon-thumbs-down'></span> Unlike </button>
<button type='button' class='btn like btn-sm'> <span class='glyphicon glyphicon-thumbs-up'></span> Like </button>
<button type='button' class='btn delete btn-sm' id='delete'> <span class='glyphicon glyphicon-trash'></span> Delete </button>
</div>
</div>
<?php } ?>
</FORM>
</div>
爲什麼你要撤消我的編輯? https://stackoverflow.com/revisions/46746019/2 - 刪除連字符,它讓你看起來好像你是** YELLING!**。編輯:哦,沒關係,克里斯很善良,以解決「爲你」。 –
爲什麼有兩個閉合的大括號?我只看到開放的'while'循環...? – iavery
**你需要學習如何調試**,然後回來告訴我們這些錯誤是什麼。 –