Pass variable value from JS to PHP

后端 未结 2 1886
粉色の甜心
粉色の甜心 2020-12-06 15:47

I have a problem in passing a value from JS to PHP so that it can be used as a parameter for a PHP function. The JS function will be trigger by onclick event once the link w

2条回答
  •  无人及你
    2020-12-06 16:21

    You pass data from the browser to your server. Javascript is a language for manipulating the browser. PHP is your server side language.

    You can pass data in a get or post request such as "mypage.php?Username=john"

    What you want is a form so that you can interact with the user

    
    
    
    INSERT MY USERNAME

提交回复
热议问题