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
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