Skip to content
Advertisement

fetch doesn’t send autofilled input

When my login credentials are prefilled by my browser (chrome) my fetch function doesn’t send the values

html

JavaScript

JS

JavaScript

PHP

JavaScript

If I type anything, it returns

object(stdClass)#3 (2) {
[“login”]=>

string(3) “qfz”

[“pass”]=>

string(5) “zfqzf”

}

If I use the browser prefill, it returns

NULL

Advertisement

Answer

It was a mistake,

as @CBroe said, it was a security problem. Changing my html to a proper form make it works as it should

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement