How to pass a database value in a hyperlink using PHP + HTML

前端 未结 4 2006
無奈伤痛
無奈伤痛 2021-01-29 06:14

I have a table in a database called Artists. It contains two bands. What I would like to do is to be able to click on the bands name using a hyper link, send that bands name to

4条回答
  •  梦毁少年i
    2021-01-29 06:37

    You need to fetch id of band, and place it into while loop to create dynamic functional links. You could use band name instead of id, but it can lead to errors. Better to do with the primary key.

    $id = $row['id'];
    " . $row['ArtistName'] . "
    

提交回复
热议问题