Was ist das Problem mit meinem Code?Löschen Tabelle Zeile PHP-Code
Mein PHP funktioniert, aber Löschen-Taste funktioniert nicht!
if(isset($_POST['delete'])) {
$ID = $_POST['value'];
$delete = "DELETE FROM tbl_document WHERE ID = $ID";
$result = mysqli_query($con,$delete);
}
$query = "SELECT * FROM tbl_document LIMIT $start, $end";
$result = mysqli_query($con,$query);
echo "<table border='1' width='300' height='160' align = center id='result'>";
echo '<tr>
<th width="80">ID</th>
<th width="200">Title</th>
<th width="260">Presented To</th>
<th width="260">Presented By</th>
<th width="160">Date Submitted</th>
<th>Location</th>
<th width="17%">Option</th>
</tr>';
while($row = mysqli_fetch_array($result)){
echo "<tr align = center >";
<td width='20' height='60'>" .$row['ID']. "</td>";
<td width='120' height='60'>" .$row['Title']. "</td>";
<td>" .$row['Presented_To']. "</td>";
<td>" .$row['Presented_By']. "</td>";
<td>" .$row['Date_Submitted']. "</td>";
<td>" .$row['Location']. "</td>";
"<td width='17%'>";
?>
<?php if($_SESSION['user'] == "1")
?>
<button class="w3-btn w3-red w3-border-large w3-circle" value="<?php echo $row['ID'];?>" name="delete" style="width:40%"><i class="fa fa-trash-o"></i>Delete</button>
<?php } ?>
<?php
echo "</td>";
echo "</tr>";
}
echo"</table>";
Ein großes Problem - Es scheint, fehlen 100% zu sein! Psi-Code kann einfach nicht halten ... –
Bitte poste deinen Code, ich denke du hast ihn vergessen. – Arendax
Code bitte !!!! –