Keeping HTML files separated from the PHP files (template based)

后端 未结 5 1667
情歌与酒
情歌与酒 2021-01-26 00:51

I am trying to keep all the PHP files separated from the HTML files. Sort of a template based project but without using any template engines as they ar

5条回答
  •  情话喂你
    2021-01-26 01:26

    Your code is a bit of a mess, you need to go back to the basics: your statement is returning $id and not $product as you mentioned. To return anything from the database, in your template.html do:

    
        
    
            
    
            

    Make sure you check the value exists first.

提交回复
热议问题