how do i create a unique php page for each row in a mysql database

后端 未结 3 1044
孤城傲影
孤城傲影 2021-01-02 21:56

I have a mysql database connected with php. However, I want each row in the database to be a unique page. Could anyone please provide some sort of overview for how this woul

3条回答
  •  清歌不尽
    2021-01-02 22:24

    Alright, first off you can't, or it will be difficult to create individual pages for each row of your table. You'll have to do it with one page and take use of the $_GET global to change which site you should view.

    For instance site.php?id=1

    site.php would look something like this roughly

    
    

    With that you can request any id you want and retrieve the content of that row/page.

提交回复
热议问题