小编典典

从php脚本制作可点击的文本

sql

我下面有一个PHP脚本

<?php include 'db_connector.php';
  $result = mysqli_query($con,"SELECT operation FROM contract");
   while($row = mysqli_fetch_array($result)) {
    echo $row['operation'];
    echo "<br>";
    echo "<br>";
  }
  ?>

产生以下有关AP事件的输出报告

Configure & Maintain Service

Configure & Monitor SNC

Configure & Monitor Service

Report ON SNC Events

在我的代码中使用它如下

<div class="description"><a id="openpanel"><?php include 'showall_contract.php';?></a></div>

我想知道如何将每个列表项(即“配置和维护服务”)设置为可单击的链接?


阅读 150

收藏
2021-04-15

共1个答案

小编典典

请在锚标记中回显为

<?php

include 'db_connector.php';
$result = mysqli_query($con, "SELECT operation FROM contract");
while ($row = mysqli_fetch_array($result)) {
    echo "<a href='your url' >" . $row['operation'] . "</a>";
    echo "<br>";
    echo "<br>";
}
2021-04-15