多くのサイトを検索しましたが、mysql で作成したクエリからリンクを作成する方法が見つかりません。
誰かがcoureurnameをクリックすると別のページにリダイレクトされるようにしたいのですが、これらのクエリ結果からクリック可能なリンクを作成するにはどうすればよいですか。以下にphpコードを使用してクエリを投稿しました。これを行う方法が本当にわからないので、皆さんが助けてくれることを願っています。
<html>
<title> lijstcoureur</title>
<head>
<H1> LIJST VAN COUREURS </H1>
</head>
<?php
$con=mysql_connect('localhost','root','****')
or die ('Kan geen verbinding maken met mySQL server');
$db=mysql_select_db('formule1',$con)
or die ('Kan de database niet selecteren');
$selectie=mysql_query("CALL lijstcoureurs()",$con);
if(!selectie)
die('Invalid query:'.mysql_error());
?>
<table border =1>
<thead>
<tr>
<?php
for($fieldindex=0;$fieldindex<mysql_num_fields($selectie);$fieldindex++)
{
echo '<th>';
echo mysql_field_name($selectie,$fieldindex);
echo '</th>';
}
?>
</tr>
</thead>
<tbody>
<?php
/*
Loop alle rijen langs en sla het resultaat op in variable $row */
while($row=mysql_fetch_array($selectie))
{
// Begin een nieuwe rij
echo('<tr>');
// Loop alle rijen langs en zet de inhoud in de tabel
for($fieldindex=0;$fieldindex<mysql_num_fields($selectie);$fieldindex++)
{
echo('<td>');
echo($row[$fieldindex]);
echo('</td>');
}
echo('</tr>');
}
?>
</tbody>
</table>
</body>
</html>