0
SQLからリストされたテーブルがあり、別のページにリンクするすべての行にボタンを追加しました。ブートストラップボタンをクリックし、行データを持つ別のページにリンクしてください
問題は、そのボタンが正しいデータ行を開くことです。
<div class="container">
<div class="jumpbotron">
<table class="table table-striped">
<thead>
<tr class="success">
<td>Date</td>
<td>Subject</td>
<td>Details</td>
<td>Status</td>
<td>ticket id</td>
<td>Actions</td>
</tr>
</thead>
<?php
while($row=mysqli_fetch_array($result))//while look to fetch the result and store in a array $row.
{
$date=$row[2];
$subject=$row[3];
$detail=$row[4];
$status=$row[5];
$tickid=$row[0];
?>
<form method="post">
<tbody method="post">
<td class="col-md-1"><?php print_r($date); ?></td>
<td class="col-md-1"><?php print_r($subject); ?></td>
<td class="col-sm-2"><?php print_r($detail); ?> </td>
<td class="col-md-1"><?php print_r($status); ?></td>
<td class="col-md-1"><?php echo $tickid ; ?></td>
<td class="col-md-1"><a href="detail.php" name="submit" id="submit"class="btn btn-sm btn-success">Details</td>
</tbody>
</form>
<?php } ?>
</table>
</div>
</div>
こんにちは、私はGETを使って試してみました。しかし、私はティッシュドを得ることができません。 – Sypnoticjr
クロムを使用している場合は、ctrl + shift + iを押して、アンカータグのhrefがdetail.php?id = somethingであることを確認します。 – Hienz