Trigger PHP function by clicking HTML link

后端 未结 5 1344
耶瑟儿~
耶瑟儿~ 2020-12-21 03:04

Is it possible to trigger a PHP function by just clicking a link? Or should I stick with the form submit method? If clicking the link will work, where should the link refer

5条回答
  •  臣服心动
    2020-12-21 03:20

    You can pass it as a query parameter of the link. http://example.com/?command=listMe&username=tom However that way everybody will be able to run the function by loading that URL

    List me
    

    and in the PHP

    
    

提交回复
热议问题