Php 如何将数据库中的数据转换为链接?
我有一个课程列表,如下所示: 课程Php 如何将数据库中的数据转换为链接?,php,html,database,forms,hyperlink,Php,Html,Database,Forms,Hyperlink,我有一个课程列表,如下所示: 课程 SE1111 SE2222 SE3333 我需要在我的页面中显示它,然后它应该重定向到保存值(当然是名称)的页面,以备将来使用 这就是我到目前为止所做的: <div id="join_courses" class=""> <form action="" method="post"> <label>Join a course:<br></label> <input placehol
- SE1111
- SE2222
- SE3333
<div id="join_courses" class="">
<form action="" method="post">
<label>Join a course:<br></label>
<input placeholder="select a course" list="courses" name="courses">
<datalist id="courses">
<option value="
<?php
include('student_register.php');//include php code that gets the tables (courses)
while($table = mysqli_fetch_array($result)) {
echo $student_courses[0];
}
?>
参加课程:
试着用一个合适的锚,像这样
while($table = mysqli_fetch_array($result)) {
echo '<a href="yourPath/'. $student_courses[0] . '">' .
$student_courses[0] . '</a>';
}
while($table=mysqli\u fetch\u数组($result)){
回声';
}
添加适当的html怎么样?我们可以看到这不是完整的代码。