document.getElementById('user-name').onkeyup = function () {
connection.extra['user-name'] = this.value;
};
document.getElementById('setup-voice-only-call').onclick = function () {
this.disabled = true;
connection.open();
};
connection.extra = {
'user-name': 'Anonym'
};
I have a PHP website were users can login. I am using $_SESSION['username']
.
How can I change the variable user-name
as session['username']
in the above JavaScript code?